Eclipse Xtend Reaches 2.4
Written by Alex Armstrong   
Friday, 22 March 2013

If you haven't heard of Xtend don't feel too bad as it isn't making news headlines like Go or Dart, but it might be important and the latest version has some interesting new features.

Xtend is essentially a language that compiles to Java, human readable Java, and it aims to improve the Java language much as CoffeeScript improves JavaScript.

Xtend 2.4 has some interesting new features, but really it is the ideas that drive the Xtend project that are really interesting. It is a Java-like language but, according to the publicity, not intended to replace Java but to improve it. 

At first look Xtend seems to be Java with some extra bits. It compiles to Java code. Yes you heard that correctly - it produces human readable Java, not machine executable byte code. This is supposed to mean that you can use your Java knowledge to go in and edit the compiled source code. It has been implemented using the Xtext system, a tool to enable the easy creation of Domain Specific Languages. In this light, Xtend is a really impressive demonstration of how powerful Xtext is.

If you would like to see it in action watch the following video which is about an earlier version: 

Xtend Intro from Xtext Team on Vimeo.


Xtend introduces lots of new features to Java that make it easier to write code. For example, it uses type inference to make it possible to write strongly typed code but without you have to declare the type of every variable. In version 2.4 the entire type system has been re-implemented to be faster and more consistent. The type inference engine is also claimed to be smarter and capable of infering type where languages such as Scala fail. 

The second big new feature is the ability to use Lisp-like macros as active annotations. You can add an annotation to indicate how elements should be translated to Java. If the term "Lisp-like" is putting you off the idea, then you need to see it in action. As the documentation says, "this is code generation like it should be".




There are also lots of smaller improvements, including a more polished IDE with formating, refactoring and generally more help. 

The new system can be used with desktop Java or it can be used with Android as this too is dependent on the JDK. The standard development environment for Android is also Eclipse, so the two fit together quite well. The new version of Xtend has support for debugging Android using the emulator and other new integration.

If you want a better Java. but still need to work with Java. then Xtend might be worth looking at. If you need to create a DSL, then certainly Xtext should be on your list of possible approaches. If it can build Xtend then it can be used for just about anything. 




Firefox 64-bit For Windows Coming Soon?

The long-awaited Windows 64-bit version of the Firefox browser is in prospect. It is already available to download in the Firefox Developer Edition Channel.

Masters Level Computer Science From Udacity

Applications for the Fall 2015 admission to Georgia Tech's Online Master of Science in Computer Science (OMS CS) are due before April 17, 2015. But if you don't want to wait you can fol [ ... ]

More News

Last Updated ( Friday, 22 March 2013 )

RSS feed of news items only
I Programmer News
Copyright © 2015 All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.