return-from-lambda viewed as dangerous, good alternatives
Peter Levart
peter.levart at gmail.com
Thu Jan 7 14:37:56 PST 2010
On Thursday 07 January 2010 19:44:22 Rémi Forax wrote:
> >>> In my opinion, if lambda are anonymous functions, return should return
> >>> the lambda result value
> >>> and lambda will never be transparent lambda.
> >>>
> >>>
> >>
> >> In other words, you disagree with John, and think that return should
> >> take on the additional new meaning of returning from a lambda?
> >>
> >>
> >
> > No, I just think there is choice:
> > Supporting transparent lambda or not supporting it but
> > you can't say something like we will see in next version if we can
> > support it.
> >
>
> To be crystal clear, this doesn't mean we can't introduce another syntax
> later for transparent blocks but this kind of block will not be lambda
> block.
The thing I have found out lately is that there is not much room for good unambiguous syntax
left in Java language. If we waste the pretty good syntax today for something that actually buys
us nothing compared to anonymous implementations of SAM interfaces except some keystrokes, then
we'll be sorry tomorrow when we won't be able to use that syntax for something much more usable.
Peter
More information about the lambda-dev
mailing list