Is there a language that gets compiled to Java code (not Byte code but Java .. so no Groovy, Scala, Jython, JRuby etc.)?
In other words is there a CoffeeScript for Java?
One of the major flaws I have against Java is that its so damn verbose and that it doesn't have multiple inheritance. It seems reasonably that one could just clean up the syntax add mixins/traits and closures through code generation.
Yeah its not elegant but coffeescript does it.
Yep, Xtend. It's a new language brought to you by the Eclipse folks: http://www.eclipse.org/xtend/
No multiple inheritance (that would be a fundamental change to Java semantics), but lots of syntactic sugar, just like CoffeeScript.
Also take a look at Mirah: http://www.mirah.org/
If you think about it, CoffeeScript compiling to Javascript means you can use coffeescript itself as a Java language. With the latest CoffeeScript (1.1.3) you might need to use Rhino directly because it triggers a JS implementation bug in the current jdk, but outside of that, you should be good to use the compiled js files to interact with Java code. :)
I wrote a pre-processor for text files that introduces {
s and }
s where there was indentation. I called it:
It is nowhere near stable, and it doesn't address some of the other shortcuts you point out that Coffeescript offers, but it does work as a proof-of-concept.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With