[squeak-dev] Ideas about sets and dictionaries round #2
Bryce Kampjes
bryce at kampjes.demon.co.uk
Thu Nov 19 21:22:54 UTC 2009
On Tue, 2009-11-17 at 07:48 -0600, Ralph Johnson wrote:
> On Mon, Nov 16, 2009 at 7:11 PM, Levente Uzonyi <leves at elte.hu> wrote:
> > Hi,
> >
> > Round #1 was mostly about sets containing nil, and the winner seems to be
> > the object-oriented solution implemented by Igor:
> > http://bugs.squeak.org/file_download.php?file_id=3829&type=bug
> >
> > What about the other ideas?
> >
> > - create a common superclass (HashedCollection) for Set and Dictionary
>
> I think a better solution is to give Set and Dictionary a common
> component, a HashTable. I've seen this done several times and it
> always resulted in a clean design. The major drawback is that
> MethodDictionary doesn't fit that design, and the VM needs to know the
> format of MethodDictionary.
MethodDictionary already uses a different implementation, it uses two
arrays one being part of the MethodDictionary and accessed via basicAt:.
Dictionary uses one Array and Associations.
Bryce
More information about the Squeak-dev
mailing list
|