Dear List,
This morning, Jannik and I were surprised by the class RuntimeStorage.
RuntimeStorage>>initialize: capacity
byGroup := Dictionary new: 24.
byName := IdentityDictionary new: 10000.
elements := OrderedCollection new: capacity
Why byName reference an identify dictionary? Why not a dictionary?
Names are usually accessed through their name as a String apparently
(e.g., importing Smalltalk packages keys entities with a String).
Should entities be accessed through a symbol instead of a string?
If entities are stored in an identity dictionary, then names must be
accessed with a symbol. If entities are to be accessed with a string,
then a dictionary should be used instead of an identitydictionary.
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project