lambda expression parameters

Tom Hawtin tom.hawtin at oracle.com
Wed Dec 19 17:15:03 PST 2012


On 19/12/2012 22:11, Talden wrote:

> If Java were done over from scratch it would be tempting to flip it on it's
> head an make everything implicitly final unless marked as a 'var'.  Heck

There's no reason why you can't do that now* for your own code without 
actually changing the language. Slap an @Var or, if you really don't 
like mutability, @Mutable on any variable you want to be non-final. I 
imagine it would be easy to modify javac or similar to do the checking.

Tom

*With the exception that you'll need final on variables for the 
soon-to-be-anomalous local class behaviour, final field semantics, 
compile-time constant inlining and reflection.


More information about the lambda-dev mailing list