Re: GWT programming with Eclipse Xtend

120 views
Skip to first unread message

RyanZA

unread,
Aug 25, 2012, 10:06:09 AM8/25/12
to google-we...@googlegroups.com
Xtend is really nice and has some very nice features, but it feels a bit like c++ operator overloading -- really nice to add operator overloading till you or someone else comes in a years time and has to double check every + to make sure it really is a plus and not something else... Basically, too much room to shoot yourself in the foot?

ie

    canvas.addGestureStartHandler(new GestureStartHandler() {
      public void onGestureStart(GestureStartEvent event) {
        event.preventDefault();
      }
    });

to

canvas.addGestureStartHandler [ preventDefault ]

If you don't know the API for 'GestureStartEvent', you might spend 30 secs looking through the class to find the preventDefault class method. Meanwhile in the java code it is annoying to write, but it is extremely obvious to anybody coming in later about what it does, etc.

I do like it though, and I think I'll give it a try for my next small project.



On Wednesday, August 22, 2012 8:25:41 PM UTC+2, Sven Efftinge wrote:
Hi all,

Xtend (xtend-lang.org) is a "better Java" which gets compiled to readable Java code. 
The language is very Java-like but comes with less boilerplate and adds modern features like lambda expressions, operator overloading, etc.. Unlike Groovy it is still statically typed (including generics, etc.) and comes with advanced IDE support (in Eclipse). I think Xtend is a perfect fit for the asynchronous and event-based programming model of GWT.


What do you think?

Cheers,
Sven
Reply all
Reply to author
Forward
0 new messages