PRE-PROPOSAL: Extension methods

Neal Gafter neal at gafter.com
Wed Mar 18 14:21:47 PDT 2009


On Wed, Mar 18, 2009 at 1:05 PM, Mark Mahieu <markmahieu at googlemail.com> wrote:
> 2009/3/18 Neal Gafter <neal at gafter.com>
>>
>> When an extension method has been statically imported, you can use it
>> as if it is a member of the type of its first argument.
>
> Just out of curiosity, what do you think the behaviour should be when the
> 'first argument' is null?  Put another way, from your experience would the
> model chosen here for C# be the right choice for Java?
> Mark

Yes, I think the right thing to do is ignore null receivers when using
an extension method.



More information about the coin-dev mailing list