We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
是的,Xtend。这是 Eclipse 人员为您带来的一种新语言: http://www.eclipse.org/xtend/
没有多重继承(这将是对 Java 语义的根本性改变),但是有很多语法糖,就像 CoffeeScript 一样。
另请查看 Mirah:http://www.mirah.org/
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/
如果您考虑一下,CoffeeScript 编译为 Javascript 意味着您可以将 CoffeeScript 本身用作 Java 语言。使用最新的 CoffeeScript (1.1.3),您可能需要直接使用 Rhino,因为它会触发当前 jdk 中的 JS 实现错误,但除此之外,您应该善于使用编译后的 js 文件与 Java 代码进行交互。 :)
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. :)
我为文本文件编写了一个预处理器,在缩进的地方引入了
{
和}
。我称之为:它远非稳定,而且它没有解决您指出的 Coffeescript 提供的其他一些快捷方式,但它确实可以作为概念验证。
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.
我编写了一个支持多重继承的 Java 转编译器(就像 CoffeeScript)。它有很多错误和限制,并且不允许许多灵活的格式选项,但它仍然存在,如果您检查它或从中创建一个分支来改进它,我会非常高兴。我可能会添加更多功能并修复许多错误,但就目前而言,它至少有效。
https://github.com/Philoprogrammer/Java-With-Multiple-Inheritance
I wrote a transcompiler (just like CoffeeScript) to Java that supports multiple inheritance. It is very buggy and limited and does not allow many flexible formatting options, but it is still there and I would be more than happy if you checked it out or made a branch from it to improve it. I will probably add more features and fix many of the bugs, but for now, it at least works.
https://github.com/Philoprogrammer/Java-With-Multiple-Inheritance