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

pharo at googlecode.com pharo at googlecode.com
Thu Feb 24 21:48:22 CET 2011


Comment #1 on issue 3752 by nicolas.... at gmail.com: [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





More information about the Pharo-project mailing list