哪种语言可以成为强大的 JVM 替代语言:Scala、Clojure、Fan、JavaFX Script 或其他语言?
我目前正在决定使用替代 JVM 语言来移植用 Java 6 编写的现有 Swing 桌面应用程序。鉴于 JavaFX 专门针对此类应用程序,看来我的最佳选择是 JavaFX Script。
但是,其他类型的应用程序和库呢?一般来说,JavaFX Script 是否是第二种 JVM 语言的最佳选择?
目前,Scala 似乎是最受关注的 Java 语言替代方案。本月(2009 年 10 月),它位于 中的第 34 位TIOBE 指数,而 JavaFX Script 位于第 44 位,Clojure、Fan 和 Groovy 位于 50 以下。
那么,您的印象如何?假设您可以自由选择给定项目在 JVM 中运行的语言,您会投入时间学习和使用哪种语言(以及原因)?
I am currently deciding on an alternative JVM language to port an existing Swing desktop application written in Java 6. Given that JavaFX specifically targets this kind of application, it would seem that my best option is JavaFX Script.
However, what about other kinds of applications and libraries? Would JavaFX Script be the best choice in general for a second JVM language?
Currently, it seems that Scala is the most talked about alternative to the Java language. This month (October 2009), it is at position 34 in the TIOBE index, while JavaFX Script is at position 44, and Clojure, Fan, and Groovy are at positions below 50.
So, what are your impressions? Which language would you invest your time in learning and using (and why), assuming you can freely choose the language for a given project to run in the JVM?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我的主要问题是:为什么要移植现有的应用程序?这个问题的答案可能会让您知道您想去哪里。
对主要选择的一些快速看法:
My main question would be: why are you porting an existing application? The answer to this question may give you some idea of where you want to go.
Some quick perspectives on the main choices:
最好的替代语言,以及总体上最好的语言,IMO,是最能让您以最佳模型编写程序的语言。
因此,如果您正在编写 GUI 应用程序,那么 Scala 可能是错误的选择,因为您不会放弃 Swing。
如果 JavaFX 最能满足您的需求,那么就使用该语言。
如果您了解 LISP,那么 Clojure 将是一个不错的选择,但是,就像 Scala 一样,听起来不是为了解决这个问题。
如果您不懂 lisp 并且想要/需要一种函数式编程语言,那么 Scala 将是最佳选择。
基本上,没有一种语言在所有情况下都是最好的,它有助于了解您想要做什么以及各种选项的优点/缺点。
The best alternate language, and the best language overall, IMO, is that which best allows you to write the program in the best model for you.
So, if you are writing a GUI app, then Scala may be the incorrect choice, as you wouldn't be moving away from Swing.
If JavaFX best meets your needs, then use that language.
If you know LISP then Clojure would be a good choice, but, like Scala, not for this problem, it sounds like.
If you don't know lisp and you want/need a functional programming language, then Scala would be the best choice.
Basically, there is no one language that is best in all situations, it helps to know what you want to do, and the strengths/weaknesses of the various options.
这些听起来都是不错的选择。您可以将 JRuby 添加到列表中...
Those all sound like good choices. You could add JRuby to the list...