CanonStringDict vs CanonicalStringDictionary

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

CanonStringDict vs CanonicalStringDictionary

Thelliez
Hello,

The naming confused me a little bit.  CanonStringDict and
CanonicalStringDictionary are implementing almost the same behavior.
But CanonStringDict does not store a value (as in key/value pair).

Trying to implement a structure for reducing the number of Strings
created in my application, it seems that CanonStringDict does what is
needed.

I am just curious about the reason(s) for the similar naming.


Cheers,
Thierry
Reply | Threaded
Open this post in threaded view
|

Re: CanonStringDict vs CanonicalStringDictionary

Dale Henrichs
Here's the official answer (from Lisa):

An artifact of GS64 1.0.  From the 1.0 Changes doc:

The AllSymbols collection has been redesigned to be more efficient and
scalable, using sorted collision buckets to permit fast binary searches,
and eliminating the extra space taken by using the symbol as both key
and value.  In GemStone/S 64 Bit, the AllSymbols collection is now an
instance of a new class, CanonStringDict.
 - The old class CanonicalStringDictionary remains in the image but is
no longer used by AllSymbols, and may be removed in a future release.
 - The new AllSymbols collection is no longer in Globals; it is now in
the UserGlobals of the SymbolUser.  This reduces the chance of
application code modifying AllSymbols incorrectly.

Dale

----- Original Message -----
| From: "Thierry Thelliez" <[hidden email]>
| To: "GemStone Seaside beta discussion" <[hidden email]>
| Sent: Monday, March 26, 2012 9:19:12 PM
| Subject: [GS/SS Beta] CanonStringDict vs CanonicalStringDictionary
|
| Hello,
|
| The naming confused me a little bit.  CanonStringDict and
| CanonicalStringDictionary are implementing almost the same behavior.
| But CanonStringDict does not store a value (as in key/value pair).
|
| Trying to implement a structure for reducing the number of Strings
| created in my application, it seems that CanonStringDict does what is
| needed.
|
| I am just curious about the reason(s) for the similar naming.
|
|
| Cheers,
| Thierry
|
Reply | Threaded
Open this post in threaded view
|

Re: CanonStringDict vs CanonicalStringDictionary

Thelliez
Thanks Dale!  That clarifies the situation.  I am going to  try CanonStringDict.


Thierry