20 Apr 2004 15:48
Re: Extending existing classes
On 20 Apr 2004, at 10:42, Jon Tirsen wrote: > You could do this using the Intra-Type Declarations/"partial classes" > feature I mentioned last week. James, I'm still waiting for an > "officical" comment on this.Sorry Jon, didn't realise you were waiting for me :) I think this is a great idea - at the very least to allow new methods to be added to any type - adding state is gonna be hard other than explicitly applying mixins which create new classes (derived types etc). I guess we should limit these methods within some kind of 'module' so that we can explicitly 'use' a module to install the necessary methods. I'm not sure on the syntax we should use for this though. I've added a page to summarise this in the JSR wiki... http://docs.codehaus.org/display/GroovyJSR/Extending+classes James ------- http://radio.weblogs.com/0112098/
Sorry Jon, didn't realise you were waiting for me :)
I think this is a great idea - at the very least to allow new methods
to be added to any type - adding state is gonna be hard other than
explicitly applying mixins which create new classes (derived types
etc). I guess we should limit these methods within some kind of
'module' so that we can explicitly 'use' a module to install the
necessary methods.
I'm not sure on the syntax we should use for this though.
I've added a page to summarise this in the JSR wiki...
RSS Feed