On 4/26/07, Damian Steer <[EMAIL PROTECTED]> wrote:

For better or worse 1.0 is counted as significant, and it's going to be
hard to change this later. So here are my two pennies (four cents for
those across the pond). I'm going to go slowly here to check I
understand it.

Agree, it needs to be nailed for 1.0, this is our one shot.

- - Interfaces will be modules (only, not classes)

- - Implementing an interface will look like:

class Foo
  include ActionListener
  ...
end

Agree with both of these.  Ditch the interface/module in the extends
node.  Or provide a shortcut (longcut) like class MyListener <
Class.new.implements(ActionListener); end

- - From java you get one shot. Can't add include more interfaces after
class creation. (Ruby will see them, however?)

I still think we need to do something about this, like perhaps
recreating and caching the java proxy every time extend/include is
used with a java class or interface as argument.

- - Adding methods to interfaces will look like:

module ActionListener
  def Foo; ...; end
end

- - Fancy extends syntax will go

If that's all correct then I really like this. It feels pretty easy to
explain to java people (interface -> module, implements -> include). As
for the wrinkle about the 'frozen interface' it feels fine to me, and
certainly less likely to bite people than other issues we have around
java integration.

Agree with both of the above.  I think interfaces as modules is the
most natural approach we've seen yet.

/Nick

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

   http://xircles.codehaus.org/manage_email

Reply via email to