What is the meaning of this?

Neal Gafter neal at gafter.com
Tue Feb 2 14:38:17 PST 2010


On Tue, Feb 2, 2010 at 2:08 PM, Joshua Bloch <jjb at google.com> wrote:

> On Tue, Feb 2, 2010 at 10:40 AM, Neal Gafter <neal at gafter.com> wrote:
>
>> I think Zdenek had it exactly right.
>>
>> A lambda expression is not an object creation expression.
>
>
> This claims is ludicrous on the face of it.  Is a lamda an expression?
>  Yes.  Does it "create" (i.e., furnish) an object (which may or may not be
> new)? Yes.  So it's an object creation expression. As far as I'm concernect,
> that's all there is to it.
>

By that logic, an expression that is boxed to java.lang.Integer is an object
creation expression too, and therefore the expression that computes the
value to be boxed (i.e. the internal field's initializing expression) should
be scoped in java.lang.Integer (by analogy with field initializer
expressions).


More information about the lambda-dev mailing list