On 8/24/06, thoran @ thoran. com <thoran / thoran.com> wrote: > Benjohn and all, > > I think our problem is that our terms are sloppy. I'd written > yesterday that I'd mistaken the functionality of Hash for > AssociativeArray, and then today I find this: > > "Hashes (sometimes known as associative arrays or dictionaries) are > similar to arrays, in that they are indexed collectives of object > references." > > OK, so who wrote that? Dave and Andrew on page 37 of Programming > Ruby, First Edition. > > See! We're all confused. (Can I blame you Dave, or Andrew, for my > confusion?) There's nothing wrong with that statement. Hashes are indexed collections of object references. (the 2nd ed uses collections rather than collectives in that sentence). There's nothing to say that indices need to be integers. And while we're at it why hasn't anyone cried out for the need for an "order preserving" array in ruby. rick@bill:~/ruby-1.8.4$ irb irb(main):001:0> a =[] => [] irb(main):002:0> a[2] = 3 => 3 irb(main):003:0> a => [nil, nil, 3] -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/