有 Java 的 Coffeescript 吗?换句话说,X 被编译成 Java

是否有一种语言可以编译为 Java 代码(不是字节代码,而是 Java .. 所以没有 Groovy、Scala、Jython、JRuby 等)?

Is there a language that gets compiled to Java code (not Byte code but Java .. so no Groovy, Scala, Jython, JRuby etc.)?

换句话说,是否有适用于 Java 的 CoffeeScript?

In other words is there a CoffeeScript for Java?

我对 Java 的主要缺陷之一是它非常冗长而且它没有多重继承.似乎可以合理地通过代码生成来清理添加 mixins/traits 和闭包的语法.

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.

是的,它并不优雅,但 coffeescript 可以.

Yeah its not elegant but coffeescript does it.

推荐答案

是的,Xtend.这是 Eclipse 人员为您带来的一种新语言:http://www.eclipse.org/xtend/

Yep, Xtend. It's a new language brought to you by the Eclipse folks: http://www.eclipse.org/xtend/

没有多重继承(这将是对 Java 语义的根本改变),但有很多语法糖,就像 CoffeeScript 一样.

No multiple inheritance (that would be a fundamental change to Java semantics), but lots of syntactic sugar, just like CoffeeScript.

还可以看看 Mirah:http://www.mirah.org/

Also take a look at Mirah: http://www.mirah.org/

相关文章