What is the meaning of this?
Joshua Bloch
jjb at google.com
Tue Feb 2 14:47:17 PST 2010
Neal,
This smacks of sophistry. Autoboxing isn't a construct to produce Integer
instances; it's a conversion that is invisibly applied to an int-valued
expression to produce an Integer.
Josh
On Tue, Feb 2, 2010 at 2:38 PM, Neal Gafter <neal at gafter.com> wrote:
> 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