How about a combo?

Neal Gafter neal at gafter.com
Fri Mar 19 17:40:02 PDT 2010


You've got it backwards.  The "diamond operator" goes on the "new"
expression, not the left-hand-side.

And the "throws" goes on a function type, not a lambda expression.

Other than that, I can't make heads nor tails of this proposal.

On Fri, Mar 19, 2010 at 5:25 PM, Pavel Minaev <int19h at gmail.com> wrote:

> On Fri, Mar 19, 2010 at 2:12 PM, Pavel Minaev <int19h at gmail.com> wrote:
> >    Function<void(int, int) throws E1, E2> f2;
> >    f2 = void(int x, int y) throws Exception -> foo();
>
> One other advantage to angle brackets approach that I had forgotten -
> it combines readily with type inference proposal for generics. E.g.
> the above becomes:
>
>    Function<> f2 = void(int x, int y) throws Exception -> foo();
>
> I'm actually curious as to how this would be handled in other syntax
> proposals.
>
>


More information about the lambda-dev mailing list