Method references with types [Re: lambda syntax tutorial]
Peter Levart
peter.levart at marand.si
Fri Aug 6 03:25:29 PDT 2010
On 08/06/10, Stephen Colebourne wrote:
> On 5 August 2010 22:08, Brian Goetz <brian.goetz at oracle.com> wrote:
> > We are for this reason considering #foo.bar() instead of #foo.bar. We are
> > also considering a greedy prefix syntax instead of infix.
>
> I'm assuming these two sentences are independent, as I can't see why
> changing the syntax solves the problem (well, I can, but only in the
> sense of having method and field references look very different, which
> seems daft).
>
> As discussed in a previous thread, John, Josh and I will steer you
> strongly towards infix. The current prototype has got it right.
>
> I'd also note that Foo#bar(...) is acceptable to me, although it feels
> somewhat pointless.
It is not. For example:
class Foo {
int bar() { return 0; } // 1st
int bar(String s) { return s.length(); } // 2nd
}
// how do I select 1st method if Foo#bar() actualy means Foo#bar(...) ?
Peter
>
> Stephen
>
>
More information about the lambda-dev
mailing list