O'Reilly logo

Implementing Domain-Specific Languages with Xtext and Xtend by Lorenzo Bettini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. The Xtend Programming Language

In this chapter, we will introduce the Xtend programming language, a fully-featured Java-like language that is tightly integrated with Java. Xtend has a more concise syntax than Java and provides additional features such as type inference, extension methods, and lambda expressions, not to mention multi-line template expressions (which are useful when writing code generators). All the aspects of a DSL implemented in Xtext can be implemented in Xtend instead of Java, since it is easier to use and allows you to write better-readable code. Since Xtend is completely interoperable with Java, you can reuse all the Java libraries; moreover, all the Eclipse JDT (Java Development Tools) will work with Xtend seamlessly. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required