capturing (or not) mutable local variables

Mark Thornton mthornton at optrak.co.uk
Sat Nov 20 01:34:39 PST 2010


On 20/11/2010 01:12, Jesse Sightler wrote:
> As a user of the Java language I completely agree that the benefits of local
> mutable variable access far outweigh the risks of misuse.
It is hard to assess those risks of misuse when the intent of the change 
is to modify practice. We are to expect many more instances of API with 
multithreaded implementations, and thus perhaps many more opportunities 
to make mistakes if no barriers to misuse are implemented.

It would be nice if local mutable variable access was possible, but 
using it a (potentially) multithreaded context generated an error or 
warning.

Mark



More information about the lambda-dev mailing list