groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J. David Beutel" <l...@getsu.com>
Subject Re: fin
Date Sat, 21 Jul 2018 23:03:44 GMT
Personally, I don't think that having the "fin" keyword alternative 
would be good.  I think it would discourage usage, as examples get split 
between "fin" and "final", and people don't already know what "fin" means.

Cheers,
11011011

On 07/21/2018 11:50 AM, MG wrote:
> Hi guys,
>
> I have been wondering for a while whether Groovy developers use "def" 
> even if a variable is actually is "final" not only because every 
> Groovy example code uses "def", but also because "final" as a word is 
> longer than "def".
> Therefore I propose to introduce the shortcut "fin" for "final" in 
> Groovy.
>
> e.g. to support
>
> class Goo {
>     fin String name
>     fin Goo gooParent
>     Goo(fin String name, fin Goo gooParent) { ... }
>     String gooGoal(fin x) {
>         fin y = 2*x
>         fin int z = x + y
>     }
> }
>
> Cheers,
> mg
>
>
>


Mime
View raw message