Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cross-project-issues-dev] Freemarker

Personally I find that the hugely increased productivity of xtend pretty strongly outweighs the disadvantages that Ed mentions below. I don't find it that slow, but maybe that's my machine. Refactoring is pretty worthless, sorry. I think the xtend team has done a masterful job just making debugging actually work w/in JDT, with redirection to the xtend code from the built java code etc.. A common language IDE would be a major boon for all of these issues. I wouldn't try to 'migrate' my existing code to xtend. I find it very natural to use the two to their best advantages. I'm tending to use xtend for a lot of the complex kind of logic / inference that you need to do where the safe nulls, lambdas, etc.. make an enormous difference in productivity, and then leave the API implementations as shell implementations in Java.

So I use it whenever I can get away w/ it -- which isn't as often as I like as in production API code we need to have a common java human readable java implementation. (So, if I was to add one thing to Ed's list it would be to make the Java output less opaque/verbose -- I have a bug on that one.)

But back to Doug's initial query, the really lovely thing about Xtend vs. the earlier template engines like xpand and jet is that it is totally infrastructure free! Since you're just compiling to straight Java now, all you need is to add the xtend tooling for dev time, and include the xbase lib and guava for runtime and you're golden. And it's *really* fast. Honestly, I can't think of why anyone who is doing java templating on Eclipse platform would use anything else. 


On 2013-10-22, at 8:51 AM, Ed Willink <ed@xxxxxxxxxxxxx> wrote:

> Hi Sebastian
> 
> You asked...
> 
> The decision to leverage JDT tooling was pragmatic but it's really slow. When you type something you have to wait for the underlying Java to get created, built, messages to appear and relayed.
> 
> If anything goes wrong you have the problems that the net effect is a cascade of JDT and Xtend idiosyncracies.
> 
> Refactoring just doesn't work.
> 
> Debugging is unpleasant because you get to see large numbers of synthetic variables in the Variables View.
> 
> Got to line can fail since some Java problems do not appear in the Xtend so you cannot got to the relevant line to fix them. You have to manually open the Java file, locate the context of the error and manually navigate back to the corresponding point in Xtend.
> 
> Personally I really dislike the syntax incompatibilities with Java although I could live with, perhaps even like, the extra type inference. Migrating to Xtend took much longer than I expected because of stupid things like changing casts to "as". Subsequently I have had to reverse the same changes in order to regain control. My current practice is to minimise my Xtend usage and avoid as many non-Java syntaxes as possible.
> 
> I find the flattening of getXX() as xx very dangerous since you get new occlusion hazards with respect to function parameters.
> 
> But ''' and guilemets are great.
> 
>     Regards
> 
>         Ed Willink
> 
> On 22/10/2013 15:35, Sebastian Zarnekow wrote:
>> Hi Ed,
>> 
>> Just because I'm curious:
>> 
>> >> However you may choose to follow my example of keeping all non-text functionality in Java base classes so that you only use Xtend as a template language and plain Java for all other things.
>> 
>> Why do you find that helpful?
>> 
>> Regards,
>> Sebastian
>> 
>> On 22.10.2013, at 16:23, Ed Willink wrote:
>> 
>>> Hi Doug
>>> 
>>> Xtend is many things, and so it is easy to get misled by today's hype.
>>> 
>>> Xtend is not a Java language extension; it has many similarities but significant differences too; beauty is in the eye of the beholder.
>>> 
>>> One of Xtend's really useful features is its triple quote operator that allows you to embed a text template within Java-ish code. Within the templates you can use guilemets to have inner control, so overall Xtend supports control within text within control; very powerful, and the whitespace tooling in the editor is good too.
>>> 
>>> For text-intensive code I can strongly recommend Xtend. However you may choose to follow my example of keeping all non-text functionality in Java base classes so that you only use Xtend as a template language and plain Java for all other things.
>>> 
>>>     Regards
>>> 
>>>         Ed Willink
>>> 
>>> On 22/10/2013 14:50, Doug Schaefer wrote:
>>>> Xtend is a Java language extension, no? I'm talking about a template engine that we use in the new project wizard to instantiate code templates based on various user selectable options.
>>>> 
>>>> I was originally thinking of Jet, but I can't seem to find it anymore. Whatever happened to it?
>>>> 
>>>> Doug.
>>>> 
>>>> From: Henrik Rentz-Reichert <hrr@xxxxxxxxx>
>>>> Reply-To: Cross project issues <cross-project-issues-dev@xxxxxxxxxxx>
>>>> Date: Tuesday, 22 October, 2013 2:43 AM
>>>> To: Cross project issues <cross-project-issues-dev@xxxxxxxxxxx>
>>>> Subject: Re: [cross-project-issues-dev] Freemarker
>>>> 
>>>> Doug,
>>>> 
>>>> have you considered using Xtend?
>>>> 
>>>> -Henrik
>>>> 
>>>> Am 21.10.2013 21:47, schrieb Doug Schaefer:
>>>>> Has anyone tried to get Freemarker into Orbit? Or is there a better template engine that people are using. CDT has it's own but I'd like to use something more standard (and better).
>>>>> 
>>>>> Thanks,
>>>>> Doug.
>>>>> 
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> cross-project-issues-dev mailing list
>>>>> 
>>>>> cross-project-issues-dev@eclipse.orghttps://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> cross-project-issues-dev mailing list
>>>> 
>>>> cross-project-issues-dev@xxxxxxxxxxx
>>>> https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev
>>>> 
>>>> 
>>>> No virus found in this message.
>>>> Checked by AVG - www.avg.com
>>>> Version: 2014.0.4158 / Virus Database: 3614/6769 - Release Date: 10/21/13
>>>> 
>>> 
>>> _______________________________________________
>>> cross-project-issues-dev mailing list
>>> cross-project-issues-dev@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev
>> 
>> 
>> 
>> _______________________________________________
>> cross-project-issues-dev mailing list
>> 
>> cross-project-issues-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev
>> 
>> 
>> -----
>> No virus found in this message.
>> Checked by AVG - 
>> www.avg.com
>> 
>> Version: 2014.0.4158 / Virus Database: 3614/6769 - Release Date: 10/21/13
>> 
> 
> _______________________________________________
> cross-project-issues-dev mailing list
> cross-project-issues-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev



Back to the top