Re: Static typing question
Jochen Theodorou <[email protected]>
| Newsgroups | gmane.comp.lang.groovy.user |
|---|---|
| Message-ID | <[email protected]> |
On 02.01.24 08:59, Agile Developer wrote: [...] > > @CompileStatic predecessor Groovy++ (which later afaik gave birth to Kotlin). > > I totally agree here. In a sense Kotlin is a statically-typed Groovy. In a sense yes. Though the focus is different. Groovy sees itself as a multiparadigm language, that wants to be very similar to java and have a maximum of integration. This then implies: * Groovy is always compiled (we have no interpreter) * generated classes are very similar to what Java knows (an enum in Groovy is the same as an enum in Java) * support of most features Java offers (for example we added records recently) * the type system is very similar * dynamic features often supported by non-dynamic structures, non-dynamic structures can be used directly from Java That was no goal of Kotlin and you see it in some constructs, requiring sometime these @Jvm annotations and the trend to rewrite existing libraries so they can be used more easily from Kotlin. bye Jochen