From: Robert Dober Date: 2006-08-22T05:32:52+09:00 Subject: Re: A use case for an ordered hash ------=_Part_50297_25628739.1156192368736 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 8/21/06, Martin DeMello wrote: > > On 8/22/06, Robert Dober wrote: > > > > First there would be the SortedHash and all you sayed was true about it > > (save that iteration would be slower, which seems wrong to me). > > And then there might be the OrderedHash, which is a Hash without any > > overhead, just offering different access methods, > > which would implement order this might be a bad idea, as the access > sorting > > can so easily be done ourselfs. > > The thing is, there's no way to preserve insertion order in a hash You did it, thank you, I was *not* talking about InsertionOrder in Hash, which is of course a *very* important one, so I want three now!!! SortedHash OrderableHash (maybe better naming) HistoricalHash (the name's a joke of course ;) without using some extra storage, and taking a bit of extra time on > insertion and deletion. Lookup and iteration would not have their > speed affected, but insertion and deletion definitely would because > you'd have to make sure the insertion order was preserved too. You summed it up nicely. ok everything sorted out now. martin > > Robert --=20 Deux choses sont infinies : l'univers et la b=EAtise humaine ; en ce qui concerne l'univers, je n'en ai pas acquis la certitude absolue. - Albert Einstein ------=_Part_50297_25628739.1156192368736--