Login  Register

Re: Issue 3752 in pharo: [bug+fix] Symbol>>allInstances should answer all symbols

Posted by pharo on Feb 24, 2011; 8:48pm
URL: https://forum.world.st/Issue-3752-in-pharo-bug-fix-Symbol-allInstances-should-answer-all-symbols-tp3323286p3323396.html


Comment #1 on issue 3752 by [hidden email]: [bug+fix]  
Symbol>>allInstances should answer all symbols
http://code.google.com/p/pharo/issues/detail?id=3752

Why should Symbol behave differently from other classes ?
Symbol is an abstract class, just like String. It has no instances. Doing  
to Symbol what you won't do to SequenceableCollection sounds unfair.

You already have two ways to collect #allSubInstances, the slow one (4  
words before) which scans the whole object memory, and the fast one  
allSymbols which just consult the well known registry of Symbols.

Yes, for maintaining unicity of symbols, a global registry is necessary, so  
please why not use it rather than bending the meaning of a generic  
reflexion message ?

Only my 2c opinion.

See also http://bugs.squeak.org/view.php?id=6584