PROPOSAL: Method and Field Literals (original) (raw)
Mark Mahieu markmahieu at googlemail.com
Thu Mar 12 14:01:36 PDT 2009
- Previous message: PROPOSAL: Method and Field Literals
- Next message: PROPOSAL: Method and Field Literals
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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).
Mark
- Previous message: PROPOSAL: Method and Field Literals
- Next message: PROPOSAL: Method and Field Literals
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]