Updated State of the Lambda

William Clark wclark1324 at comcast.net
Wed Sep 18 13:50:48 PDT 2013

One thing I've always wanted to point out concerning capturing mutable 
local variables that always seems to go unmentioned; it doesn't just 
risk race conditions, it introduces are whole new class of error:

void foo() {

Runnable bar() {
     int n = 0;
     return () -> { n = 5; }

You don't have to just prevent them from leaving their capturing thread, 
you can't let them escape their capturing method as a return value or 
argument... Making them essentially useless.


On 9/16/2013 3:36 PM, Brian Goetz wrote:
> I've posted updated (and hopefully final) editions of "State of the
> Lambda" and "State of the Lambda, Libraries Edition" at:
> http://cr.openjdk.java.net/~briangoetz/lambda/lambda-state-final.html
> and
> http://cr.openjdk.java.net/~briangoetz/lambda/lambda-libraries-final.html

More information about the lambda-dev mailing list