Begin forwarded message:
From: Alexandre Bergel Alexandre.Bergel@inria.fr Date: April 21, 2009 10:20:10 AM CEDT To: Pharo Development Pharo-project@lists.gforge.inria.fr Subject: [Pharo-project] RuntimeStorage Reply-To: Pharo-project@lists.gforge.inria.fr
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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
In VW, we use Symbols for names and not strings. One reason is exactly that identity is faster than equality.
Cheers, Doru
On 21 Apr 2009, at 11:05, stephane ducasse wrote:
Begin forwarded message:
From: Alexandre Bergel Alexandre.Bergel@inria.fr Date: April 21, 2009 10:20:10 AM CEDT To: Pharo Development Pharo-project@lists.gforge.inria.fr Subject: [Pharo-project] RuntimeStorage Reply-To: Pharo-project@lists.gforge.inria.fr
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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Every now and then stop and ask yourself if the war you're fighting is the right one."
This is what I though. There is something wrong in the Pharo Smalltalk importer then. It should be hard to fix.
Cheers, Alexandre
On 21 Apr 2009, at 11:27, Tudor Girba wrote:
In VW, we use Symbols for names and not strings. One reason is exactly that identity is faster than equality.
Cheers, Doru
On 21 Apr 2009, at 11:05, stephane ducasse wrote:
Begin forwarded message:
From: Alexandre Bergel Alexandre.Bergel@inria.fr Date: April 21, 2009 10:20:10 AM CEDT To: Pharo Development Pharo-project@lists.gforge.inria.fr Subject: [Pharo-project] RuntimeStorage Reply-To: Pharo-project@lists.gforge.inria.fr
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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Every now and then stop and ask yourself if the war you're fighting is the right one."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
I hope you meant that it should _not_ be hard to fix :)
Doru
On 21 Apr 2009, at 13:30, Alexandre Bergel wrote:
This is what I though. There is something wrong in the Pharo Smalltalk importer then. It should be hard to fix.
Cheers, Alexandre
On 21 Apr 2009, at 11:27, Tudor Girba wrote:
In VW, we use Symbols for names and not strings. One reason is exactly that identity is faster than equality.
Cheers, Doru
On 21 Apr 2009, at 11:05, stephane ducasse wrote:
Begin forwarded message:
From: Alexandre Bergel Alexandre.Bergel@inria.fr Date: April 21, 2009 10:20:10 AM CEDT To: Pharo Development Pharo-project@lists.gforge.inria.fr Subject: [Pharo-project] RuntimeStorage Reply-To: Pharo-project@lists.gforge.inria.fr
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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Every now and then stop and ask yourself if the war you're fighting is the right one."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Speaking louder won't make your point worthier."
Indeed. The worth is that I even have read my email before pressing send
Alexandre
On 21 Apr 2009, at 13:45, Tudor Girba wrote:
I hope you meant that it should _not_ be hard to fix :)
Doru
On 21 Apr 2009, at 13:30, Alexandre Bergel wrote:
This is what I though. There is something wrong in the Pharo Smalltalk importer then. It should be hard to fix.
Cheers, Alexandre
On 21 Apr 2009, at 11:27, Tudor Girba wrote:
In VW, we use Symbols for names and not strings. One reason is exactly that identity is faster than equality.
Cheers, Doru
On 21 Apr 2009, at 11:05, stephane ducasse wrote:
Begin forwarded message:
From: Alexandre Bergel Alexandre.Bergel@inria.fr Date: April 21, 2009 10:20:10 AM CEDT To: Pharo Development Pharo-project@lists.gforge.inria.fr Subject: [Pharo-project] RuntimeStorage Reply-To: Pharo-project@lists.gforge.inria.fr
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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Every now and then stop and ask yourself if the war you're fighting is the right one."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Speaking louder won't make your point worthier."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev