Will groovy (grails) give you compile time checking like java?
If you always specify the type, will that change things much?
Will groovy (grails) give you compile time checking like java?
If you always specify the type, will that change things much?
The Groovy compiler will of course find syntax errors, but almost no type errors as with Java. Even the use of undeclared variables will often pass compilation.
Declaring types will increase the amount of checking that is done, but not by much.
This is because Groovy is a dynamic language with powerful metaprogramming features that make it impossible for the compiler to know e.g. what methods or fields a given object will have at compile time, since it's possible for this to be changed at runtime by other code.
However, IDE plugins offer a compromise by marking members of variables with a declared type that are not present in the class declaration as possible errors. Then the developer can decide whether this member will be present at runtime, or whether he just made a typo. Additionally, known class members appear in autocompletion.
No.
It was designed to be a dynamic-typing programming languages which is pretty much the opposite as compile time checking.
You'll have to add more unit tests instead.