Rick DeNatale wrote:
> On 8/21/06, Bil Kleb <Bil.Kleb / nasa.gov> wrote:
> 
>> Phillip Hutchings wrote:
>> > Using an ordered hash for one
>> > person's benefit would kill the speed and jack up memory usage.
>> >
>> > [..] but replacing the Hash is not the way to go.
>>
>> I don't think anyone is suggesting replacing the
>> existing Hash.  As I see it, the ordered hash would
>> merely be an alternative to the standard hash.
> 
> 
> Which, as has been shown can be provided without changes to the base
> specification/implementation of Ruby.

Sure. And if you didn't have Hash, you could implenent
your own.

> The fly in the ointment, is that a few of the proponents of
> OrderedHash seem to strongly require a literal syntax for the beast.
> That's the one thing which seems to require divine intervention <G>.

Yes. That's the thing which makes hashes in Ruby bearable.
(How do they work in Java? I forgot.)

After all, C has arrays. But even if they were "heterogeneous"
like Ruby arrays, they still wouldn't be as fun and convenient
as the ones in Ruby. And OO is part of that, but syntax is also
part. Notation does matter.

> Personally, I don't feel a burning need for it, and not knowing the
> implementation cost, I'm not sure if the idea "pulls it's own weight."
> But that's just a personal opinion.
> 
> Heck, the old Smalltalk equivalent of hash Dictionary, gave you the
> keys as a Set, and the values as a Bag when you asked for them!
> 

That would give me a headache. :)


Hal