IDE 很好地支持哪些 JVM 功能语言? (IDE:IDEA、Netbeans、Eclipse 或类似的)
我花了很多时间寻找一种可以无缝访问 Java 遗留代码(Weka 代码)的函数式语言。导入的 Java 类方法的自动完成功能会非常好。 我就说说我的感受吧,如有错误请指正。
Yeti 对我来说非常有吸引力,因为它简单且类似于 ML,但我无法为其设置一个好的 IDE。我也不知道该语言本身是否已经可以在现实生活中使用。
Groovy、JRuby 和 Jython 看起来很成熟,但功能性并不强。 Scala 很成熟,但也是面向对象的,至少在 Netbeans(还有 Eclipse,如果我没记错的话)上它是有缺陷的。
“OCaML-Java”也是面向对象的,但尚未准备好使用(3 或 4 个单独的项目)。我认为在 IDE 中它更不易于使用。
Jaskell似乎已经死了。
Clojure 看起来很成熟,并且在 Intellij IDEA(La Clojure 插件)中工作得非常好,但我不确定在编码时每行要写超过 2 个括号。
SISC和ABCL我没有尝试。我认为没有IDE支持。
CAL(或 Quark ... Blah ...)语言通向 SAP 站点,此后我对函数式 JVM 语言的耐心搜索结束了。
类似的问题也有,但不全面。例如: 哪种函数式编程语言在 Eclipse 中提供最佳支持?
是否缺少一些能够直接调用java类的JVM函数式语言? 如果 Yeti 拥有像 Clojure (在 IDEA 中)那样的 IDE 支持,那么它对我来说将是完美的。
谢谢
编辑------------------------------------
我可以在Intellij IDEA中使用Clojure+Scala。 互操作性示例:
Scala 代码
package a
class ScalaMain {
def test = {
"testing!"
}
}
Clojure 代码
(import '(a ScalaMain)) ;'
(def scalainstance (new ScalaMain))
(print "printing: " (. scalainstance test))
太棒了!
I have spent much time looking for a functional language that can seamlessly access Java legacy code (Weka code). Autocompletion of imported Java class methods would be excellent.
I will present my impressions, please correct me if I am wrong.
Yeti is very appealing to me because it is simple and ML-like, but I couldn't setup a good IDE for it. I don't know also if the language itself is already usable in real life.
Groovy, JRuby and Jython seem very mature, but are not really functional.
Scala is mature but is OO also and at least on Netbeans (and Eclipse if I remember well) it is buggy.
"OCaML-Java" is OO also and doesn't come ready to use (3 or 4 separate projects). I suppose that in IDEs it would be even less ready to use.
Jaskell appears to be dead.
Clojure seems mature and works really well in Intellij IDEA (La Clojure plugin), but I am not sure I want to write more than 2 parens per line while coding.
SISC and ABCL I didn't try. I think there is no IDE support.
CAL (or Quark ... Blah ...) language leads to a SAP site and after that my patience searching for functional JVM languages ended.
There are similar questions but not comprehensive. For instance:
Which Functional programming language offers best support in Eclipse?
Is some JVM functional language that is capable to call java classes directly missing?
If Yeti had IDE support as Clojure has (in IDEA), it would be perfect to me.
Thanks
EDIT-----------------------------------
I could use Clojure+Scala in Intellij IDEA.
Example of interoperability:
Scala code
package a
class ScalaMain {
def test = {
"testing!"
}
}
Clojure code
(import '(a ScalaMain)) ;'
(def scalainstance (new ScalaMain))
(print "printing: " (. scalainstance test))
Spectacular!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Scala + eclipse IDE(最新版本) http://www.scala-ide.org/ 似乎变得越来越好。 IntellijIDEA 插件也是如此。现在有很多人/公司使用 Scala 进行开发...我不认为他们都只使用文本编辑器。
我认为目前大多数 FP 语言是 Scala(多范式)和 Clojure(纯函数式) Scala 是 OO 有什么问题吗?
您可以期待新语言的出现,例如 Kotlin 和 Ceylon 也具有函数式特性,但它们也将是 OO 的,所以我认为您现在唯一的选择是 Scala 和 Clojure 之间。
您的列表中缺少 Fantom 语言。它也有功能特性,但我认为它缺乏 IDE 支持(或者至少没有更新到最新版本)
更新:现在有一个基于 eclipse 的 Fantom 编程语言 IDE,看起来非常不错。您可以在这里找到它:http://www.xored.com/products/f4/
Scala + eclipse IDE (latest version) http://www.scala-ide.org/ seems to be getting better and better. Same for the IntellijIDEA plugin. There are lots of people/companies now developing with Scala... I don't think they all use Text Editors only.
I think that the most FP languages at the moment are Scala (multi-paradigm) and Clojure (pure functional) What is wrong with Scala being OO?
You can expect new languages comming such as Kotlin and Ceylon having functional features as well but they will also be OO, so I think your only choice now is between Scala and Clojure.
From your list you missing Fantom language. It also has Functional features, but I think it lacks IDE support (or atleast it is not updated to the latest versions)
UPDATE: There is now an eclipse-based IDE for the Fantom programming language that looks really nice. You can find it here: http://www.xored.com/products/f4/
Clojure 在 java 互操作性 + 功能性 + 具有 lisp 的优点方面非常出色。虽然其他 IDE 支持 clojure ,但 emacs 工作得非常好,只是需要时间学习和习惯 emacs 编码方式。
Clojure is excellent when it comes to java interoperability + functional + having advantages from lisp. Though other IDE's support clojure , emacs works really well except that it takes time to learn and get used to emacs way of coding.
Clojure 的互操作故事非常精彩。 clojure 的一个主要优点是它的集合都实现了 Java 集合 API 中的接口,您不必调整 Clojure 集合或将它们复制到 Java 集合以将它们传递给 Java 代码,只要 Java 代码不这样做即可修改它们的内容。反之亦然,Java 集合可以与许多有用的 Clojure 函数一起使用,例如
map
reduce
filter
等...我我知道有人因为这个原因放弃了 Scala 而转而使用 Clojure。在 Clojure 中编写 Java 互操作代码也很容易,它使用的括号比在等效 Java 代码中使用的括号少。
例如,
这需要一些时间来适应,但如果你仔细想想,其实并没有那么不同。比较下面这行 Java 代码和 Clojure,我想你都会理解。
忽略 System.out 的限定和 Java 示例中的附加分号,唯一真正的区别是括号现在位于函数调用之前。胡言乱语!
它是不同的,但它可能不像您想象的那么糟糕,如果您尝试一下,您可能会发现该语言具有令人信服的好处。如果您需要 IDE 支持,请查看 IntelliJ 中的 LaClojure 或 Netbeans 中的 Enclojure。我知道 Enclojure 提供了良好的补全支持,我认为这实际上仅在您处理大量 Java 时才有用。在 Clojure 中没有网络的情况下执行效果很好。
Clojure's interop story is fantastic. A major win with clojure is that its collections all implement the interfaces that come in the Java collections API, you don't have to adapt Clojure collections or copy them to Java collections to pass them to Java code as long as the Java code does not modify their contents. The reverse is also true, Java collections can be used with many of the Clojure functions that are useful like
map
reduce
filter
etc... I know somebody who ditched Scala for Clojure for this reason amongst others.Its also easy to write Java interop code in Clojure that uses fewer parens than you would use in the equivalent Java code.
e.g.
It takes some getting used to, but if you think about it, its not really all that different. Compare the following line of Java code v.s. Clojure, I think you'll understand both.
Discounting the qualification of System.out and the additional semi-colon in the Java example, the only real difference is that the paren is now in front of the function call. Crazy talk!
It is different, but it may not be as bad as you think, and if you give it a try you might find compelling benefits in the language. If you want IDE support, check out LaClojure in IntelliJ or Enclojure from Netbeans. I know that Enclojure offers good completion support, which I think is really mostly only useful if you're dealing with lots of Java. Performing without a net in Clojure works fine.
Frege 现在还有一个(仍然非常基本)eclipse 插件。
Frege has now also a (still very basic) eclipse plugin.