PRE-PROPOSAL: Extension methods
Florian Weimer
fw at deneb.enyo.de
Wed Mar 18 14:39:06 PDT 2009
* Neal Gafter:
>> (Does this proposal imply import statements? Would they make sense in
>> this context?)
>
> I don't understand this question. Java already has import statements.
At block level, within methods? Really?
>> Oh, and I wonder how this particular brand of extension method will
>> interact with reifed/compile time generics.
>
> I don't see how there could be any issue. The spec for extension
> methods would remain unchanged by the addition of reified generics.
> Extension methods are done by a syntactic transformation based on the
> static type of the receiver, not its dynamic type.
It might be interesting if extension methods were visible within
reified generics in some way. This could be used to provide quite
flexible compound literals.
More information about the coin-dev
mailing list