3 ms·
It is. And the feature hasn't really been ignored. The hash-syntax was amended so that passing arguments as hashes can be made to look more like named arguments
by Xylakant 14y ago
It is. And the feature hasn't really been ignored. The hash-syntax was amended so that passing arguments as hashes can be made to look more like named arguments [1]. It's still not named arguments, but about as good as you can make it while still remaining somewhat backwards compatible. So yes, it took a long while but no, the pain was not very great. I never really missed that.
[1]
Voice-of-Evening:~ fgilcher$ irb
1.9.3p125 :001 > def foo(args)
1.9.3p125 :002?> puts args.inspect
1.9.3p125 :003?> end
=> nil
1.9.3p125 :004 > foo bar: "baz", foo: "bar"
{:bar=>"baz", :foo=>"bar"}
=> nil
1.9.3p125 :005 >