groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MG <>
Subject fin
Date Sat, 21 Jul 2018 21:50:14 GMT
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


View raw message