Eclipse.org's Xtend language is all about modernizing Java apps. At least that's the view of Xtend advocates, who say that the statically typed language, which runs on the JVM (Java Virtual Machine), removes unnecessary syntactical noise, is easy to learn, and lets developers enhance existing Java APIs through extension methods and lambda expressions.
InfoWorld Editor at Large Paul Krill talked with Xtend co-architect Sebastian Zarnekow about Xtend following Zarnekow's presentation at the JavaOne conference last week in San Francisco. The senior software architect at Itemis, which specializes in model-based software development, expanded on the benefits of Xtend, including why it is less complex than Scala, the increasingly popular statically typed JVM language that Zarnekow called "scary."
[ JavaOne also featured a surprise appearance by Java founder James Gosling, as well as Oracle heralding upcoming Java upgrades. | Think you know Java? Test your programming smarts in InfoWorld's Java IQ test. | Master the latest in Java development with our JavaWorld Enterprise Java newsletter. ]
InfoWorld: What was the genesis of Xtend?
Zarnekow: We started the Xtend project as a proof of concept that real programming languages can be created with the Xtext framework [for domain-specific languages]. The vision was having something that simplifies the life of a Java developer while being able to address the issues that Xtend [the previous language of the same name] and Xpand [template language] addressed.
InfoWorld: What's the difference between the old Xtend and the new Xtend?
Zarnekow: The old Xtend was the brother of Xpand, so it only provided extension methods, whereas the new Xtend is a complement to Java and the successor of Xpand and the old Xtend.
InfoWorld: The old Xtend didn't run on the JVM, did it?
Zarnekow: No, it was an interpreted language.
InfoWorld: You mentioned that Xtend is similar to but not as scary as Scala. What's scary about Scala and why isn't Xtend scary?
Zarnekow: The Scala type system is quite complicated for most developers. [It is] so complicated that it's even hardly possible to create a reasonable IDE for that. Even though Scala is statically typed, there are so many implicit things going on that a developer has a really hard time to understand what happens there.
InfoWorld: For what type of applications is Xtend best suited?
Zarnekow: Basically, everything that you would otherwise do with Java can be done with Xtend.
InfoWorld: What is the main advantage of Xtend compiling to Java source code and not to Java byte code?