I agree. But, I prefer the braces for code (code is more
fundamental than hashes and deserves {}). I think this current
syntax looks good to me:
Hash["a" => 100, "b" => 200]
···
--- Ben Giddings <bg-rubytalk@infofiend.com> wrote:
On Thursday 12 May 2005 13:38, David A. Black wrote:
> You'll have to fight it out with the ones who wanted braces
for block
> literals and hashes to be something elseI could accept that too -- I would just want one syntax for
blocks, a
different one for braces, and no confusing middle ground.I'd be happy with this for arrays too:
["pet" => "dog", "name" => "fred", "drink" => "ale"]
or
["pet": "dog", "name": "fred", "drink": "ale"]
I just think that {a => b} and {a <= b} are too similar.
__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail