Re:Objective-C, Ruby and Python for Cocoa
by look_lookatme on Sunday January 11, 2009 @07:28PM
(#429885)
This is not a special syntax. It's just ruby 1.9 specific hash literal syntax.
[ Parent
| on HN ]
But it looks like the important thing is that they have found a way to automatically map this syntax to Objective C method names.
EDIT: Or, as the MacRuby docs put it:
"MacRuby has a modified version of the parser which detects calls or method definitions using one regular argument, and other arguments using the key/value pair syntax. It will reconstruct the Objective-C full selector if needed. The method name that will be used in the Ruby VM is the same as the Objective-C selector."