From: Hal Fulton Date: 2006-08-25T07:52:46+09:00 Subject: Re: Call for crystalization --was:A use case for an ordered hash Pit Capitain wrote: > > Sven, regarding the "HistoryHash" part of your post: > > In order to replace the standard Hash with a "better" Hash, there should > be a clear agreement on its desired behaviour. I don't think this > agreement has been achieved yet. What should be the result of the > following code? > > hh = HistoryHash.new > hh[:one] = 1 > hh[:two] = 2 > hh[:one] = 3 > hh.each do |k, v| p k end > > Should it be > > :one > :two > > or > > :two > :one > > Why should it be the one or the other? An excellent point, and there are other similar questions to be answered. As for replacing Hash with another implementation, I would be OK with it (if it proved reasonably speedy). Others would not want it even if it were the same speed as before. I think the people calling for an ordered hash are a sizable group, but still a minority. Hal