PROPOSAL: Method and Field Literals
neal at gafter.com
Wed Mar 11 16:58:52 PDT 2009
On Wed, Mar 11, 2009 at 4:37 PM, Stephen Colebourne
<scolebourne at joda.org> wrote:
> >> In summary, the real question with the proposal is whether we can
> >> implement member literals independently of method references and
> >> closures? The answer is definitely yes if we use the ## syntax, and
> >> probably yes if we use #.
> > Is there something I should mention in the proposal?
> I think the proposal needs to note that a resolution of the potential
> conflict with method reference/eta expansion is required. This could to
> let later changes handle it, to accept method references are boxed, or
> to use a different syntax. Perhaps there is another option too. (I know
> Neal has some concerns on this conflict of syntax)
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).
More information about the coin-dev