« Return to Thread: New Java integration features

Re: New Java integration features

by Charles Oliver Nutter-2 :: Rate this Message:

Reply to Author | View in Thread

Charles Oliver Nutter wrote:
> This extensive support of Ruby naming may be going too far. I'm really
> looking for opinions on this, to see whether it's too much. In general
> my primary goal was to allow users to use either straight-up Java names
> or various gradations of Ruby names, all the way to the most Ruby-like =
> or ? underscored names. So those extreme cases work and all intermediate
> cases work. But is it excessive?

There is another small issue here: extending concrete classes. Because
in the extension/override case there's usually already existing methods
of that name, the Ruby naming logic I added for interfaces doesn't work.

The way I justify it for the moment is that overriding methods from a
concrete or abstract superclass is about replacing exactly the
same-named method. But of course there's an argument to be made that you
should be able to replace that method with any of its Ruby analogs. So,
what do you think? If I have this code in Java:

public class Foo {
   public Object getBar() { ... }
   public void setBar(Object bar) { ... }
}

Should I be able to do this:

class RubyFoo < Foo
   def bar; my_getBar_logic; end
   def bar=(x); my_setBar_logic; end
end

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


 « Return to Thread: New Java integration features