Preparing for the 0.2 draft

Stephen Colebourne scolebourne at joda.org
Tue Feb 2 10:38:33 PST 2010


On 2 February 2010 18:25, John Rose <John.Rose at sun.com> wrote:
> And, at present, Java hoists scopes (into inner classes) in a non-racy manner.  This is a direct and intentional result of the 'must be final' rule.

I disagree that this is the case from the developers POV.

A developer can take a mutable object, declare it as a final variable,
and use it freely within the inner class.

And if a developer needs to get around the 'final' restriction, they
will simply create a single entry array to do so.

In other words, these problems exist today, and we're not making them
worse here.

Stephen


More information about the lambda-dev mailing list