Mr. Big wrote:
> Ruby 2.0 will include new syntax for hash literals: {a:3, b:4}. However, 
> one can leave off the {}s to create a hash. 
> 
> Won't this create confusion? 

I am personally not in favor of allowing the : character instead of =>. 
(The last time I checked, this new syntax was marked as highly 
experimental and not a done deal yet).

With colons already in use to denote the start of a symbol name, using a 
colon as a separator between a key-value pair is going to confuse many 
people, especially since everyone seems to like their own whitespace 
conventions.

I hope Matz reconsiders and decides that the "experiment" is not worth 
it.

As an aside, I wonder why => was chosen instead of a simple = sign. 
Seems like it's un-ruby-like to make us type the extra character :-)

Jeff
www.softiesonrails.com


-- 
Posted via http://www.ruby-forum.com/.