[Pharo-project] SmallDictionary ?? vs RB SmallDictionary

Stéphane Ducasse stephane.ducasse at inria.fr
Tue Jan 13 06:01:54 EST 2009

  Sounds really interesting. Thanks for the pointer.
I will have a look.
Ideally I would like to have a good collection library and the  
variation you mentioned are proving that
this is the way to go.


On Jan 13, 2009, at 10:56 AM, Lukas Renggli wrote:

>> We have no idea where SmallDictionary come from? It was not in 3.9
>> Especially since
> The original SmallDictionary comes from RB. I once read some
> justification why this is useful for RB, but I do not remember where I
> found that.
>> and it does not seems defined as needed.
>> RBSmallDictionary seems much better.
> They both have the problem that they subclass from Dictionary and you
> inherit a lot of stuff that is not really necessary. As far as I know
> the original RBSmallDictionary was not a subclass of Collection.
>> We are currently applying traits tests to these classes and this is
>> really interesting to see the bugs popping out.
> Seaside has WASmallDictionary, another reincarnation of the  
> RBSmallDictionary.
> We need it because we have lots of small dictionaries that we want to
> access fast. Furthermore the WASmallDictionary is ordered, so it
> remembers the order in which keys are added. This makes everything
> that seaside produces deterministic and therefore much easier to test
> (before sometimes attributes appeared in a different order in the
> generated html). Also WASmallDictionary makes it easy to have
> subclasses where the same key is defined multiple times (as for
> example necessary for request and response header fields).
> Of course we also wrote a lot of tests. Maybe you want to have a  
> look at those?
> Cheers,
> Lukas
> -- 
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> Pharo-project mailing list
> Pharo-project at lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

More information about the Pharo-dev mailing list