Hi Lukas,
On Nov 11, 2012, at 2:19 PM, Lukas Eder <
lukas...@gmail.com> wrote:
> Let me explain:
>
> 1. Using Xtend in jOOQ's code generator would mean that jOOQ users wanting to change the code generator would have to learn a new syntax which somewhat resembles Java, Scala and Groovy, but is neither one of them.
I don't know what kind of extension pattern you provide, but your users should be able to just use Java, Scala, or Groovy if they think those langs work better for them. After all you end up with Java classes.
> If Xtend would implement much of the JLS, Xtend could be better promoted, IMO. I understand that adding extension methods, lambda expressions, operator overloading, etc. makes Java a better language, long before Java 8.
and Java 12 ;-)
> But, without knowing the internals of Xtend, I think that these additions don't have to be done at the cost of writing actual Java. Are there plans of bringing just multi-line strings and templating to Java through "Xtend light", which doesn't drastically change the Java language? Personally, I would love to see this working along the lines of the Java 8 syntax…
No plans, but I also don't think that we drastically changed what's in Java. We left some things out and there are four or five real syntactical differences you have to know. But beyond that it's just very useful extensions you don't want to loose again as soon as you got used to it (template expressions being one of them).
> 2. This would probably be easy to "fix". The runtime library is very slim, wouldn't it make sense to add an option to inline its source code along with the generated artefacts? If Xtend-generated code didn't have any external dependencies, I might re-evaluate adopting Xtend for jOOQ's code generator.
We don't have concrete plans in that direction yet, since without the libraries and extensions a lot of the advantages of Xtend would get lost.
For Java 8 some of that functionality will be covered in JDK, so we might come with a slimmer variant then.
If having the additional jars is really so problematic, why don't you just include the classes into your jar?
> On the other hand, I have started using Xtend to generate the repetitive parts of the jOOQ API. I really have to say again, multi-line string templating has been really well done!
I hope you'll enjoy the other features as well some day :-)
Cheers,
Sven