Comments on the straw man...

Neal Gafter neal at gafter.com
Mon Dec 14 09:16:04 PST 2009


On Fri, Dec 11, 2009 at 11:17 AM, Neal Gafter <neal at gafter.com> wrote:

> 4. Variable Capture.  Needs more refinement about what is meant by
> "effectively final".  Despite the strawman's reference, the JLS DA/DU rules
> can't be used for this purpose; a new and separate dataflow specification
> would be required.  That is likely to be comparable in size to the existing
> JLS3 DA/DU analysis and require a significant effort to specify and
> implement correctly.


It wasn't as bad as I feared.  First, extend the definition of *definitely
unassigned* so it is allowed to be applied to non-final variables.  Then:

A local variable is *effectively final* if it is never the target of an
assignment expression except where *definitely unassigned*.

Cheers,
Neal


More information about the lambda-dev mailing list