2 ms·
> typing is generally pretty optional Don't use Apache Groovy in typed mode -- hardly anyone else does, and you won't find any typed Groovy in its own codebase
by vorg 9y ago
> typing is generally pretty optional
Don't use Apache Groovy in typed mode -- hardly anyone else does, and you won't find any typed Groovy in its own codebase, only Java. Groovy was originally built as a JS-style dynamic language and is best used in untyped mode.
- zmmmmm 9y agoFwiw, I use @CompileStatic it extensively and find it pretty good. There are the odd times when it generates a bizarre failure that I can't solve, but they are rare enough that I don't mind. I recently converted a whole project from Groovy to Scala hoping for performance benefits and found that my dynamic Groovy sprinkled with a few static compile hints ran faster than the Scala version. By the time I got the Scala version to the same speed as the Groovy version it looked a lot less like idiomatic Scala than the typed Groovy looked like idiomatic Groovy. So overall pretty happy with it, and I hope they keep improving it.
- vorg 9y agoMost developers will use known code samples (e.g. Groovy's lack of statically compiled Groovy in it's own code base) rather than anonymous claims (e.g. you using @CompileStatic extensively) when deciding on a programming technology.