Xtensive new language features

Eclipse’s JVM language Xtend reaches 2.3 M7

Chris Mayer

With June’s release imminent of Xtend, Sven Efftinge reveals just some of what’s new for the JVM statically typed language

Set to make its big splash in the Juno release train, the team
behind Xtend have revealed just some of what is new to the JVM
statically typed language ahead of the big day in June.

Xtend, for those
unaware, is quite proud of its Java heritage compiling to readable
code, but intends to put its own spin on things by cutting out a
lot of the noise (boilerplate code) that can often be infuriating
with Java. It also brings in features made famous by the likes of
Groovy, Scala and Smalltalk to provide a comprehensive Java
experience, crucially without having to leave Java behind.

2.3 M7
outlines just some of what is new for the language as it
prepares to debut as part of the release train. Aside from around
150 bug fixes, there’s a variety of new annotations at your
disposal. The new annotation @Property brings forth a
Java-Bean-style getter and setter (if the field is not final) for
an annotated field.

class Person {
  @Property String firstName
  @Property String lastName

Another annotation @Data turns an annotated class into a value
object class, which means all fields are flagged as final and
that getter methods will be generated (if not existent). Plans
are also afoot to include project-specific annotations like
@Delegate but this won’t make into the release in time.

@Data class Person {
  String firstName
  String lastName

There’s a raft of compiler improvements as well. You can find
more information in the New and Noteworthy section, which runs
through all the M6 enhancements too, with basic functions
such as debugging, type and call hierarchies, refactoring. The path
is set for the final release then as Xtend looks like it will fit
like a glove seamlessly into Eclipse’s JDT.

comments powered by Disqus