Whither extension methods?
Howard Lovatt
howard.lovatt at iee.org
Tue Dec 15 06:26:52 PST 2009
It is an interesting idea that I had not considered, this might well be a
good solution. Existing code that had not being recompiled would call
List<E> sort() and when you compiled the code against the new interface you
would get an error. You would have to fix the error, probably by making a
new class that avoids the name clash, which would still be irritating but
not impossible. It is an idea worth considering - does anyone else see a
problem with this idea?
2009/12/15 Mark Thornton <mthornton at optrak.co.uk>
> Howard Lovatt wrote:
>
>> 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.
>>
>> I was thinking more of byte code which hadn't been recompiled. In this
> case the linker could allow both methods to coexist. Of course if you did
> recompile the source with the new definition of List, there would be an
> error. So binary compatible but not source compatible.
>
>
> 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