groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Theodorou <blackd...@gmx.org>
Subject Re: About supporting `var` of Java10+
Date Thu, 08 Mar 2018 12:32:00 GMT


Am 08.03.2018 um 12:45 schrieb mg:
> Maybe I am missing your point, but what I meant was: When I use
> 
> var x = new Foo()
> 
> I indicate that x will be reassigned further down in the scope, 
> otherwise I use
> 
> final x = new Foo()

That's what I understood. But the later variant is not part of the JEP. 
In Groovy what you wrote is an alias for final Object x = new Foo()

bye Jochen

Mime
View raw message