From: Eric Christopherson Date: 2011-01-29T15:37:27+09:00 Subject: Re: why is overloading invalid in ruby. Whenever the overloading topic comes up, I wonder about what the future holds regarding true named arguments. Does anyone know? Specifically, MacRuby has an extension to the usual hash parameters that seems pretty complicated to me, but allows it to interact fairly painlessly with Objective-C*. It basically allows you to define a method with named parameters. It's bewildering because a method invocation like "person.setFirstName('Gloria', { :lastName=>'Alvarez' })" actually calls a *different* method from "person.setFirstName('Gloria', lastName: 'Alvarez')" (the former is the regular Ruby hash argument type; the latter uses the MacRuby-specific keyed arguments. If no keyed-argument version of a method exists, it will just translate it into a hash-argument form.) Anyway, I wonder if there has been any talk between MacRuby and the other Ruby implementations on getting this sort of keyed arguments standardized. * Objective-C, like Smalltalk, has methods with multi-part names, where some of the arguments go inside the method name; e.g. you have a method beginSheetModalForWindow: modalDelegate: didEndSelector: contextInfo: where each colon marks a place where an argument should go. Generally the word (or few words) right before the colon indicate what the argument is supposed to be, semantically.