Xtend, recently released programming language is widely known as CoffeeScript for Java or Java 10. It looks like Groovy, but it has the special property of being compiled into Java source code instead of bytecode.
“It is the only language I know which compiles to Java source code, which is its most important property for Android development”, says Andre Medeiros, Software Engineer, Futurice.
Following are the core features of Xtend are as follows
- Multi-paradigm
- Supports lambdas and operator overloading
- Functions are first-class objects
- Has type inference
- Optional semicolons
Medeiros also provided sample source code which examines the functioning of the new features in depth. Futurice in a recent blog post stated that they successfully delivered an Android app built on Xtend language. According to them, developing in Xtend was not only quicker than Java to some extent but also safer against null pointer exceptions.
“The Java code it compiles to can be inspected and debugged as any other Java Android app can be. The generated Java code is not beautiful, but still understandable and maintainable. For these reasons, we decided to adopt Xtend in a new customer project. It is a nice language I can gladly recommend to anyone doing Android development, and who is open to program in Eclipse or some raw text editor like Sublime Text or Vim or Emacs”, says Medeiros in his blog post.