From: Hal Fulton Date: 2004-04-24T12:08:26+09:00 Subject: Re: pushing hash Pe�a, Botp wrote: > Dave Thomas [mailto:dave@pragprog.com] humbly replied: > > >>>Is there a reason why "<<" isn't allowed for hashes? >> >>Perhaps because hashes aren't ordered, and the common >>semantics of "<<" >>implies order. > > > Yes, you're right sir Dave, but that is an old notion. > I much prefer > > hash << "x"=>2 > > rather than > > hash["x"] = 2 > > The latter uses "[]" notation, wc is used for arrays, wc implies order, > right? Well, perhaps we should either enable it for Hash or disable it for Set. But then, pushing hash is illegal in most countries. Hal