We will brainstorm on this one a bit, but if we can make all Ruby core
types aware of common "it should work" Java types then we may not have
an actual need for explicit coercion.  For example,  if
RubyFixnum.op_plus(...) accepts a version which works with
java.lang.Number (and subtypes) then things will work for + out of the
box and not break older code.

How does everyone feel about leveraging some more duck-typing in Ruby? Maybe this was mentioned already, but I'll just repeat it if that's the case:

I often have code that could be simplified to something like this: yell_text_field.text = yell_text_field.text.upcase

I really don't care that it's a String, just that it behaves like a String (: I'm not sure if that's a lot of work or not, but if that can be achieved then it really doesn't matter what's being passed around. Maybe these objects would also respond to kind_of? in a cheating manner (Java's String returns true when asked if kind_of? a Ruby String), but I'm not convinced that's a super great idea.

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

   http://xircles.codehaus.org/manage_email


Reply via email to