Effectively final

Brian Goetz brian.goetz at oracle.com
Mon Aug 15 14:58:20 PDT 2011

>> Remi has it right here.  You can say "all these languages let you do X
>> with closures", but all of those idioms have their roots in a 1950s
>> programming model where parallelism was science fiction.
> There are other ways of scaling your program over multiple cores without
> letting your objects be executed concurrently by more than one thread.
> In some of these models closures that mutate local vars make a lot of sense.

That's absolutely true.  But the bar is not, and should not be, "we 
should add a language feature if there is some model in which that 
feature makes sense."  The ability to point to examples where it would 
be safe or sensible is a necessary, but not remotely sufficient, 
condition to justify inclusion of a language feature.

The choice to exclude mutable local capture was not an oversight, but 
the result of a reasoned tradeoff which includes cases like those you 
allude to.

More information about the lambda-dev mailing list