Re: [EXT] Re: Using `var` as method return type placeholder

2024-11-22 Thread Gianluca Sartori
> > var was always intended for the case of "type inference from an > assignment", the way it is used in Java, and imho that is also what people > coming fom other languages would expect. > My perception is that a feature like `var` is useful only when you cut-and-paste a Java code in a Groovy fil

Re: [EXT] Re: Using `var` as method return type placeholder

2024-11-22 Thread MG
1. Groovy has been a hybrid dynamic & static language for a long time: https://docs.groovy-lang.org/latest/html/documentation/core-semantics.html#_static_compilation 1. The @CompileStatic and @TypeChecked annotations can be applied to whole projects, classes or methods to switch th