In association with heise online

07 November 2011, 10:18

Spotllght on Eclipse's Xtend language

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

Xtend logo

Xtend is a new language that has been designed, say its developers, to "embrace Java... kill the noise... and add some sugar". Xtend is not a new project but has been a subproject of the Eclipse Xtext project. The statically typed language, which reuses Java's type system and relies on the JDK's libraries, is compiled into readable Java code. The language joins the range of alternate languages that target Java's virtual machine, such as Scala, Clojure, Kotlin and Project Ceylon, but is unlike them because it does not compile to Java byte code, but Java code.

"Xtend is really not meant to replace Java but to modernize it a bit" say its creators, pointing to its type inference, simpler property access and optional parentheses for less "noisy" code and closure support, switch with expressions, templated expressions and ability to extend existing methods for richer code. Xtend is, because it compiles to Java, able to interoperate with existing Java code. A video from the developers shows how the language is derived from Java and some of the features it offers.

Some Xtend features demonstrated

The compilation of Xtend code is managed in the Eclipse IDE and has been created using Xtext to provide automatic incremental compilation of code as it is developed. Xtext also provides syntax colouring, content assist, rename refactoring and other, now commonly expected, IDE features.

Although the Xtend language may not be breaking much new ground, its use of Xtext, which is designed to make the creation of domain specific languages easier and as well tooled as mainstream languages, shows the power of Xtext. Xtext 2.1 was released last week with simpler expression embedding, improvements in the editor, refactoring and in builder performance.


Print Version | Send by email | Permalink:

  • July's Community Calendar

The H Open

The H Security

The H Developer

The H Internet Toolkit