Primitives in Generics (+ the meaning of this)

Alex Blewitt alex.blewitt at
Sat Jul 17 01:22:23 PDT 2010

On Sat, Jul 17, 2010 at 4:02 AM, Collin Fagan <collin.fagan at> wrote:
> Group 1 prefers:
> function types
> lexical scoping
> exception transparency
> lexical break, return, continue
> MethodHandle
> and most importantly lambdas are *not* objects
> Group 2 prefers:
> interface SAM conversion
> abstract class SAM conversion
> local return, break, continue
> 'this' refers to lambda
> identity is preserved
> Method,Constructor and Field references.
> more like anonymous inner classes
> lambdas *are* objects

I believe this is a good summary. What I don't think we should do is
have a mix-and-match between the two; at the moment, we seem to have
'return' based on Group 1 and everything else on Group 2, with a new
(overloaded) keyword 'yield' to mean local return. As Stephen pointed
out in a different thread, it would make sense for
return/break/continue to mean their current semantics and keywords,
and base the decision of whether something is in Group 1 or Group 2 by
the enclosing construct.


More information about the lambda-dev mailing list