3 ms·
...but the perceived philosophy of Ruby is along the lines of "developer joy above anyth else" (above speed, above code readability etc.) and this is a 100% dev
by nnq 14y ago
...but the perceived philosophy of Ruby is along the lines of "developer joy above anyth else" (above speed, above code readability etc.) and this is a 100% developer joy feature and it's been ignored time and time again (probably because people are too busy building cool stuff to have time to bitch about this but still...)
- Xylakant 14y agoIt 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 >