Groovy and Java in Mixed Mode

It sucks! It just sucks!

javac is generating byte code. groovyc is generating byte code. bothe are generating byte code for the jvm. From the byte code perspective their is no different between java and groovy. And in the IDE, IntelliJ IDEA, you can easily mix Java classes with groovy classes. No Problem. No errors and no warnings. But as soon you try to compile and to execute everything you get trouble. I did some research and found this article here:

It basically says that if you are mixing java and groovy and you have dependencies between them, than it does not work. Because your code at first get compiled with javac and than with groovyc. You have to use interfaces to resolve the dependencies.

Common! Are you serious? Of course their are dependencies if you are mixing java with groovy! And I don’t want write for every single PoJo a fu**ing Interface. That is the Enterprise Overhead approach I try to avoid with a scripting language.

And why it is not possible to compile groovy with javac? I mean their is JSR for groovy. It is standard. It is from the same vendor. And in the end it is anyway just byte code for the JVM. It would absolute make sense! And in that way the groovy + java mix mode problem could be resolved easily.