PROPOSAL: Method and Field Literals
Rémi Forax
forax at univ-mlv.fr
Thu Mar 12 14:24:05 PDT 2009
Mark Mahieu a écrit :
>
> On 12 Mar 2009, at 20:55, Rémi Forax wrote:
>
>> Neal Gafter a écrit :
>>>
>>> I may regret saying this later, but I am not concerned about the
>>> potential conflict. I believe we can use the exact same syntax and
>>> distinguish whether it should be a java.lang.reflect.Method or a
>>> closure from context. Since we're doing Method first, it would take
>>> priority (just like a method invocation that requires no boxing is
>>> preferred during overload resolution to one that requires some
>>> argument to be boxed).
>>>
>>>
>> Neal,
>> I don't know if you will regret saying this but
>> I will regret to not saying that it will create lot of puzzlers like
>> this one:
>>
>> class A {
>> static int f(int) { ... }
>> }
>> ...
>> {int => int} c=A#f(int);
>> A#f(int).equals(c) // false because A#f(int) is a
>> java.lang.reflect.Method
>>
>>
>> Rémi
>>
>
> I expect that would rather depend on how closure equality is defined
> (or not).
Here equals() is called on Method.
>
> Mark
>
Rémi
More information about the coin-dev
mailing list