[MacRuby-devel] Future MacRuby support for "name-mangling" ?

Matt Aimonetti mattaimonetti at gmail.com
Sun Nov 14 13:20:38 PST 2010


It actually is also helpful to quickly see the difference between Obj-c/C methods/functions & Ruby methods.
It also helps with documentation.

I agree with Joshua, I don't see that change happening anytime soon either.

- Matt

Sent from my iPhone

On Nov 14, 2010, at 12:49, Joshua Ballanco <jballanc at gmail.com> wrote:

> Hi Scott,
> 
> MacRuby's spiritual predecessor RubyCocoa did this sort of substitution of camelCase for under_case. However, I don't foresee this name-mangling being a part of MacRuby's near future for one very important reason: MacRuby methods *are* Objective-C methods.
> 
> I'm not aware of the particulars of the IronRuby or JRuby bridges, but in the case of RubyCocoa, there is a translation step to get from a Ruby method name to an Objective-C selector. In MacRuby, there is no transation step. MacRuby method names are Objective-C selectors and vice versa. So, we'd have to *add* a step in the method dispatch to do translation (since there isn't already one). It's not impossible, but I would guess it's pretty low on the priority list at the moment.
> 
> Cheers,
> 
> Josh
> 
> 
> On Nov 14, 2010, at 11:51 AM, Scott Lowe wrote:
> 
>> Hello,
>> 
>> Both JRuby and IronRuby support translation from 'native' CamelCase method names to the
>> lowercase_with_underscores naming convention in idiomatic Ruby.
>> 
>> They IronRuby guys call this "name-mangling": http://ironruby.net/Documentation/.NET/Names
>> 
>> I had an expectation that this would be the case with MacRuby, but I now know that this is
>> not true. Are there any plans to implement this feature in the future? You can probably guess
>> that I like this feature an awful lot.
>> 
>> Regards,
>> 
>> Scott
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20101114/748367df/attachment.html>


More information about the MacRuby-devel mailing list