Zarnekow: The Java compiler does a lot of checks for us that otherwise would happen at runtime only, so it helps. It's far more complicated from a given viewpoint to create source code, that's true. But on the other hand, for the end-user it's far easier to understand what happens under the hood, so being able to look at the result of compilation is a benefit that cannot be overvalued.
InfoWorld: You say Xtend has exceptional DSL support and offers annotations on steroids. Can you elaborate on those two concepts?
Zarnekow: Exceptional DSL support is mainly about being able to use other languages that are built with Xtext on the one hand side, so [it is about] interacting with external DSLs. But more importantly, [Xtend has] a syntax that is so flexible that an API can be created in order to directly express the intent of the code without leaving encapsulation or static typing. That is possible with Xtend. By combining orthogonal concepts such as overt overloading or extension methods in combination with the support for lambda expressions and type inference, one can achieve quite readable and remarkable APIs for specific use cases.
InfoWorld: What about annotations?
Zarnekow: Annotations support is something that we have in the pipeline for the next release. What you can do is develop the client of an annotation and the annotation processing itself side by side and without having to deploy something, you can live-influence the way that Xtend is compiled to Java source code. There's again an advantage in compiling to source code -- you immediately see what your annotation processor does by simply looking at the resulting Java code. You can write annotations in order to validate the structures of your Xtend classes in a domain-specific manner.
InfoWorld: What's the status of Xtend? How old is it and what's the next step for it?
Zarnekow: Xtend 2.3 [akin to a 1.0 release] was released this summer. The plan is to have a new release at the end of this year. Annotation processing will be more mature in summer 2013.
InfoWorld: When you say Xtend supports extension methods, could elaborate a bit on that?
Zarnekow: Extension methods are a means to extend types of the Java VM in a lexically scoped way. So without altering the class, you can make functionality methods syntactically available. That is comparable to what other JVM languages do as well, or what C# did. But Xtend goes one step further. We allow [developers] to write extension methods as instance methods, so you can leverage all these things like polymorphism. Combined with dependency injection, you can create a quite extensible API based on extension methods.
This article, "Eclipse Xtend on JVM: Not as 'scary' as rival Scala," was originally published at InfoWorld.com. Follow the latest developments in business technology news and get a digest of the key stories each day in the InfoWorld Daily newsletter. For the latest developments in business technology news, follow InfoWorld.com on Twitter.