Whither extension methods?
Howard Lovatt
howard.lovatt at iee.org
Tue Dec 15 04:41:18 PST 2009
This might well be possible, but it would be more work since it is a change
to the type system (it would have to infer the method to call from the LHS
of an assignment). I suspect this is too big a change to the type system.
2009/12/15 Mark Thornton <mthornton at optrak.co.uk>
> Howard Lovatt wrote:
>
>> Note Traits as proposed in the blog referenced above do not need old code
>> to
>> be recompiled to use the new Trait methods; the linker will add missing
>> methods. There is a backward compatibility problem if an existing method
>> in
>> someone's internal implementation clashes with a new Trait method. EG if
>> someone had an implementation of List that added "List<E> sort()" then the
>> linker could not add "void sort()", in such a case a linking error
>>
>>
> In Java "List<E> sort()" isn't compatible with "void sort()", but at the
> JVM level the signature includes the return type. Would this make it
> possible to resolve such a 'clash' without needing to throw a linking error?
>
> Mark Thornton
>
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email______________________________________________________________________
>
--
-- Howard.
More information about the lambda-dev
mailing list