Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 1.0
-
Fix Version/s: 1.1-beta-1
-
Component/s: class generator
-
Labels:None
-
Environment:All
-
Number of attachments :
Description
There are some use cases for which it would be desirable to be able to use Groovy as a 'better Java'. That is, that Groovy should compile down to pure Java .class files, with absolutely no runtime dependencies, even if that means we lose some of Groovy's beyond-Java abilities.
The current runtime dependency on GroovyObject means we have to ship an additional 2MB worth of JARs with our app, which is unacceptable for rich client apps.
An example of such a use case would be:
- Using GroovyBeans as a shorthand for defining all the getters/setters in a JPA entity: http://www.curious-creature.org/2007/03/25/persistence-made-easy-with-groovy-and-jpa
I am closing this as "Won't Fix" because at the moment Groovy does not intend to create binaries that can be sued without Groovy. Using the right tool for the job is the right way and I somehow doubt, that using Groovy for this is the right way. I already mentioned Janino, I think that this will do the job much better. Groovy is no bytecode generation framework.