Hi Aaron,

> Just like with any technology, Xtend has flaws. From my experience, the
> advantages outweigh the flaws.

Yes, I have seen you debugging it :-)

> We'd need a version of Xtend on Maven Central but that shouldn't be a show
> stopper. Other projects need the same plus the generated code doesn't have
> any dependencies. The dependencies are only necessary when someone works on
> the code generator itself.

>From what I understand, running such a code generator will need some
runtime dependencies?

>> 4. interoperable enough (Xtend / Xtext code cannot be mixed with Java
>> code)
>
> Bullshit. I'm extending Java classes from Xtend and I'm extending Xtend
> classes in Java. The output of Xtend is pure Java. What gives you the idea
> that Java isn't compatible with Java?

I cannot write Xtend code in a ".java" file. Neither can I write Java
code in a ".xtend" file. I see no strong reason for that not to be
possible.

> Code generators are a specialized niche. There are people who believe that
> you can write and maintain code generators in Java but these people simply
> don't know what they're talking about or they have unreliable memory.

Hehe, that paragraph clearly carries Aaron's signature, alright :-)

> I implemented your code generator in ONE WEEK. How many months did the Java
> version take? How often did you try to fix something just to break it even
> worse?

I was pretty happy with the current generator. It didn't suffer from
many regressions, as it is fully integration-tested. The fact that you
could write yours in one week is also related to the fact that all the
thinking about *what* should be generated was already done. You just
translated mine, you didn't create a generator.

> If you compare my code to the Java version, which one can you
> understand?

I do agree, the current generator suffers from pretty unreadable code
for first-time and second-time readers.

> Xtend is a lot like JSPs but it doesn't suffer from these because there is a
> good editor. Code is compiled right away as you type (and more complex
> validations happen when you safe it). There is code completion, even inside
> templates. The code is readable (unlike JSPs) because you can indent it.
> Unlike JSPs, the output is also readable.

Well, I did understand how Xtend works, and I found it quite
interesting, too. But for now, I rest my case. For me to implement,
maintain, and support such an Xtend-based generator, the platform is
not:

1. stable enough
2. independent enough
3. java enough
4. interoperable enough

I'm sure, this will improve in the future, when I can still rethink
this decision. In the mean time, as I've told Adam Gent in a previous
mail:

In any case, don't be discouraged by my decision not to use Xtend.
Feel free to publish, maintain and support your own generator
implementation. If you wish, I can then reference to such an
inofficial generator implementation from the jOOQ website.

Cheers
Lukas

Reply via email to