Monday, March 07, 2011

Xtend Screencast Part 3 - Rich Strings (i.e. Codegeneration)

Xtend is a programming language with special support for code generation and traversing typed object graphs (like EMF models). It is developed with Xtext 2.0. So the question is what is so special about code generation, that we need special support in a language? Well it's mostly string concatenation, and the most readable way of doing string concatenation is using a template syntax.

Today's screencast covers rich string expressions. It resembles the basic template syntax known from Xpand but in Xtend they are expressions, so you can use them everywhere a normal expression is expected. The new and unique aspect about Rich Strings is their intelligent whitespace handling system, including nice tool support. See it yourself:

You can get your hands on this at EclipseCon in just two weeks and/or at JAX in two months.
The final release of Xtext 2 and the new Xtend language is June 22nd (Eclipse Indigo).