From: "alexeymuranov (Alexey Muranov)" Date: 2012-04-30T08:30:30+09:00 Subject: [ruby-core:44761] [ruby-trunk - Feature #6375] Python notation for literal Hash Issue #6375 has been updated by alexeymuranov (Alexey Muranov). Matz, currently { 'a': 'b' } does not work in Ruby, do you propose that it be a synonym for { :a => 'b' } in a future version? If not, i do not see your point. The { a: 'b' } syntax is already exceptional, i do not think it will become even more exceptional if { :a : 'b' } for { :a => 'b' } and { 'a' : 'b' } for { 'a' => 'b' } are added. (For me it is like omitting curly braces in the special case of interpolating an instance variable in a string: "#@x" works, but "#x" with a local variable x does not.) Alexey. ---------------------------------------- Feature #6375: Python notation for literal Hash https://bugs.ruby-lang.org/issues/6375#change-26321 Author: alexeymuranov (Alexey Muranov) Status: Rejected Priority: Low Assignee: Category: core Target version: Is there a reason not to use Python notation for literal Hash as an alternative to Ruby notation? I would like to be able to write either { 'a' => 'b', 'c' => 'd' } or { 'a' : 'b', 'c' : 'd' }, and either { :a => 'b' } or { :a: 'b' } . I find { a: 'b' } to be a confusing alternative to { :a => 'b' }, and do not use it because of this (because it cannot be used if the key is not a symbol). -- http://bugs.ruby-lang.org/