3 ms·
The Groovy compiler feels like a half-baked product, just as the language. It cannot decide if it wants to be a statically typed language or a dynamic one. It
by haspok 7y ago
The Groovy compiler feels like a half-baked product, just as the language. It cannot decide if it wants to be a statically typed language or a dynamic one.
It happens all too often that I have to manually cast stuff because the compiler cannot deduct the type of an expression. Seriously, it feels like writing Java pre-1.5 (before Generics).
At the same time, your code might just compile, and you'd get a runtime error because you forgot to rename an attribute that you referenced, and due to some dynamic wizardry Groovy tries to retrieve it anyway.
It is the very opposite of the Erlang universe, where the more time I spent the more impressed I got. So really no comparison between the two, forget Groovy if you have more than a toy project. Java on the other hand... will soon have it's fibers thanks to Project Loom...
- zmmmmm 7y ago> your code might just compile, and you'd get a runtime error because you forgot to rename an attribute The eclipse plugin has a pretty good approach in that it underlines things that cannot be deterministically type checked (that is: it can't prove they are wrong, but it can't prove they are right). It does a fair bit of type inference, so once you get used to that it's reasonably low amount of pain that comes from this type of problem.