`

谁是下个JVM王者语言?

阅读更多
                                                          The next big JVM language?

There’s an interesting thread of comments related to a blog post by Stephen Colebourne, who is giving a talk at this year’s JavaOne entitled “Next Big JVM language.” In particular, he and others note that the Fantom language could be the answer (I find this interesting as Fantom really wasn’t even on my radar. Until now.). Moreover, many of the threads claim Scala to be the next big language. It seems people still prefer static typing over dynamic-ness. Either way, I got the distinct impression, based upon those individuals that left comments, which, by no means reflects the community at large, that Groovy isn’t it.

Principally, the arguments against Groovy can be summarized as its lack of performance (compared to Scala, for instance). Not to be outdone, a few folks brought up Groovy++ (which attempts to add a bit of static-ness to Groovy ostensibly to increase performance). Nevertheless, the comments are quite interesting to read if for anything that Fantom is gaining mind share perhaps at the cost of other more mainstream alternatives like Groovy.

 

    这几年,关于谁是下一个JVM上的王者语言之争已经不是新鲜事情了。看了上面的文章,您是不是又所感慨呢?

 

笔者对部分上述语言接触过,下面发表一下意见:

 

Groovy:在这些上述语言中,我认为它是最接近于Java的语言,并且提供了闭包和动态类型等特性。学习曲线不陡峭,并且学习资源很多。可惜性能让人失望,因此,一直不被笔者考虑作为实现语言。当年的GoG就是模仿RoR来实现快速Web开发,方便地解析XML文件,集成Spring和ORM,这些让SSHer欣喜不易。本人虽然没有深入研究,不过规约大于配置的开发模式,着实让我眼前一亮。不过,动态语言Groovy并没有让我看到它的光明的未来。说到Groovy的未来,当然还看SpringSource发展路线。也许正如上文所说,Groovy++才是正确的方向。

 

Scala:这门函数型语言能够让Groovy发明者后悔,能够让twitter放弃Ruby(至少部分放弃),转而拥抱它。这些足以证明Scala是一门优秀语言,静态类型安全,提供闭包功能,简化并发编程,弥补Java的不足。不过它的语法确实比较晦涩,我想这就是它最大的伤痛。Scala前途还是比较光明的。

 

Fantom:实际上,笔者还没有接触过,只是看了下:http://fantom.org/doc/docIntro/WhyFantom.html 。它给我第一个感觉是,像雾像雨又像风(C++、Java和其他语言的混合体)。先不说它是否简单,不过它还是有特斯色的。当年,Java号称跨平台的语言,虽然目前.NET可以跨平台(如果您的是HelloWorld工程的话,不必担心风险)。可是Fantom确实跨语言加跨平台的,这个是很强大啦。目前,Java和.NET的跨语言不过是建立在JVM和CLR平台上。Java和.NET两大平台通讯还是需要靠第三方协议(比如WebServices)。Fantom其他的方面没有什么特色,并且学习资源太少。

 

Clojure:第一次知晓这门语言,是通过看庄周梦蝶 的Clojure的blog。本人正在学习中,这门语言让我想起了“伊波兰式”(操作符号在操作数之前),并且执行语句皆在"()"里面,真如其名-封闭(其实没有这个英文单词,只有closure)。尽管这门函数语言,语法上非常不贴近于Java,但是简洁的代码足以替代臃肿的Java代码,即使和Scala比较,也不是同一个级别的。不过和Scala一样,提供优雅的函式和并发编程,不过纠结的语法确实不适合传统C语言系的开发人员。不过我还是比较看好它,试想一旦掌握后,那是多么“暴力”的语言。

 

JavaScript:从感情和熟悉程度上,笔者偏好JS。众所周知,JS作为浏览器内建语言,提供了灵活的前端页面控制。语法上,从普通的函数编程发展到prototype和闭包,并且通俗易懂;功能上,从DOM操作,到Ajax,再到目前的WebSocket;实现上,从客户端程序到服务端程序。目前的Node.js(在V8平台)可以实现服务端I/O操作,那么,实现Web服务端不在话下。在Web2.0时代,熟悉JS的人要比熟悉Java人还要多。同时,Java 6.0提供了JavaScript解释引擎,.NET就更不用说了。综上分析,下一个JVM王者语言很有可能就是JavaScipt。

 

Java:这么多年来,Java是最成功的语言之一。无论哪门语言都有缺点,然而越是出名,越是招骂。Java 7的闭包、模块化和GC优化等功能能不能成功地拯救Java,就看JVM产商的啦。我相信,大家都期待Java能过王者回归。

 

似乎上述语言都有希望称为JVM的王者语言。从JVM实现来看,JVM还是非常强大的。

 

下文推崇Groovy和JRuby,以供参考:

 

                                                                                  Top five scripting languages on the JVM
   Groovy and JRuby lead a strong field, with Scala, Fantom, and Jython following behind

 

   Anyone who has followed software development tools during the last decade knows that the term "Java" refers to a pair of technologies: the Java programming language and the Java Virtual Machine (JVM). The Java language is compiled into bytecodes that run on the JVM. Through this design, Java delivers its vaunted portability.

The language and the JVM, however, have been increasingly moving in opposite directions. The language has grown more complex, while the JVM has become one of the fastest and most efficient execution platforms available. On many benchmarks, Java equals the performance of binary code generated by compiled languages such as C and C++. The increasing complexity of the language and the remarkable performance, portability, and scalability of the JVM have created an opening for a new generation of programming languages. These languages lack Java's syntax overload (often referred to disparagingly as its "ceremony") -- that is, the amount of excess code that needs to be cranked out before the code that does the actual work can be written -- but take advantage of the JVM.

......

 

 

PS:笔者学识和技术有限,不足的地方请指正。

 

分享到:
评论
51 楼 braveone 2011-01-30  
掉进java这个大缸里,要学一辈子的习,想着java还没完全掌握,还有什么javaee、spring、hibernate这些掌握虽然可以干活,但在java的世界这完全是刚起步,完全心颤,胆寒,但真为java世界的生机勃勃惊叹不已。
50 楼 baby8117628 2010-08-24  
mysyche 写道
任何的计算机语言的出现,都是为了满足和解决需要的,java能用几年的时间到现在的使用情况,已经是真正的王者。现在出现的一些动态语言(groovy),只能说:提高开发效率,语法更自然些,但不能说对习用应用的运行就有好处的。
一些小的应用如:网站 可以采用 。大型的应用 还只能是java。

我未来3年内还是坚挺:java。别的动态语言,接近java 我再考虑学习,和使用。



应该这样,不要盲目的追求某些新东西.
49 楼 mercyblitz 2010-08-24  
baby8117628 写道
mercyblitz 写道
lkj107 写道

javascript跟jvm有关系?

JavaScript可以在JVM上运行,并且调用Java丰富的类库和JRuby一样。



可以这样么???



当然可以,你可以看看 JVM Script engine。
48 楼 baby8117628 2010-08-24  
tuoxie007 写道
本人正在准备抛弃Java投向ROR的怀抱

你是一个很冲动的人.
47 楼 baby8117628 2010-08-24  
mercyblitz 写道
lkj107 写道

javascript跟jvm有关系?

JavaScript可以在JVM上运行,并且调用Java丰富的类库和JRuby一样。



可以这样么???
46 楼 robert 2010-08-19  
shxiao 写道
肯定是clojure,语言简洁而且表达能力太强悍了.

两年前就开始关注,只可惜写过一点点小项目,被上司直接拒绝了..


Clojure 的学习曲线就在第一个小时。
因为它太不同了,基于 S-Expression 和那么多基于语句的语言好像完全来自两个星球。

但如果任何有真正经验的 Java 程序员用 5 个小时来走完 labrepl 这个基础教程,你一定会爱上它。你会感到惊奇,为什么这么少语法会达到这么高的表达能力?为什么基本不用面向对象也能有更高的质量?为什么消灭变量就消灭了 Bug?

Clojure 能否成为下一个关键语言的未来在于所有程序员内心的开放程度。如果你能真的开放,你很难拒绝它。
45 楼 mercyblitz 2010-08-19  
shxiao 写道
肯定是clojure,语言简洁而且表达能力太强悍了.

两年前就开始关注,只可惜写过一点点小项目,被上司直接拒绝了..



一般上司多少有点保守,并不是批判,而是现实主义。

看看专家的意见,
引用
In fact, this is often a way to spot a noob. The believe they know it all, and will argue to death either online or offline. They will argue in absolutes, like "This is ALWAYS better than that", or "This is THE way to things" etc. Experts rarely do that. They know, that it all depends on situation, skills your developers have, tools chosen by your company, company policies, personal preferences etc. Inexperienced developers (and people in general) tend to believe the world is black and white. Experts know, it's full of gray scales, and even lots of additional colors and shades.


来自:
http://www.iteye.com/topic/740505


44 楼 shxiao 2010-08-19  
肯定是clojure,语言简洁而且表达能力太强悍了.

两年前就开始关注,只可惜写过一点点小项目,被上司直接拒绝了..
43 楼 sinoyster 2010-08-19  
如果groovy++能并入 groovy,那么grails还是很强悍的
42 楼 tuoxie007 2010-08-19  
本人正在准备抛弃Java投向ROR的怀抱
41 楼 mercyblitz 2010-08-18  
mysyche 写道
任何的计算机语言的出现,都是为了满足和解决需要的,java能用几年的时间到现在的使用情况,已经是真正的王者。现在出现的一些动态语言(groovy),只能说:提高开发效率,语法更自然些,但不能说对习用应用的运行就有好处的。
一些小的应用如:网站 可以采用 。大型的应用 还只能是java。

我未来3年内还是坚挺:java。别的动态语言,接近java 我再考虑学习,和使用。


我倒是认为开发语言不应该拘泥于形式(语法),而是看使用场景和语义完整性。
40 楼 mysyche 2010-08-18  
任何的计算机语言的出现,都是为了满足和解决需要的,java能用几年的时间到现在的使用情况,已经是真正的王者。现在出现的一些动态语言(groovy),只能说:提高开发效率,语法更自然些,但不能说对习用应用的运行就有好处的。
一些小的应用如:网站 可以采用 。大型的应用 还只能是java。

我未来3年内还是坚挺:java。别的动态语言,接近java 我再考虑学习,和使用。
39 楼 mercyblitz 2010-08-18  
Arden 写道
mercyblitz 写道
tamsiuloong 写道
js还能在jvm里面运行?是不是真的啊?意味着什么呢


完全可以,JDK 6 集成了在Mozillia的JS工程rhino http://www.mozilla.org/rhino/



看看ringojs
http://github.com/ringo/ringojs


貌似就是建立在Rhino上面的Stack,呵呵!
38 楼 Arden 2010-08-18  
mercyblitz 写道
tamsiuloong 写道
js还能在jvm里面运行?是不是真的啊?意味着什么呢


完全可以,JDK 6 集成了在Mozillia的JS工程rhino http://www.mozilla.org/rhino/



看看ringojs
http://github.com/ringo/ringojs
37 楼 mercyblitz 2010-08-18  
tamsiuloong 写道
js还能在jvm里面运行?是不是真的啊?意味着什么呢


完全可以,JDK 6 集成了在Mozillia的JS工程rhino http://www.mozilla.org/rhino/

36 楼 tamsiuloong 2010-08-18  
js还能在jvm里面运行?是不是真的啊?意味着什么呢
35 楼 lishali12345 2010-08-18  
对Scala有点兴趣,楼主的分析还是很给力啊
34 楼 mercyblitz 2010-08-17  
Arden 写道
mercyblitz 写道
heoxsoft 写道
  Clojure is a dynamic programming language that targets the Java Virtual Machine. It is designed to be a general-propose language, combine the approachability and interactive development of a scripting language with an efficient and robust infrastructure of multithread programming. Clojure is a compliled language - it compiles directly to JVM bytecode. yet remains completely dynamic. Every feature supported by Clojure is supported at runtime. Clojure provides easy access to Java frameworks, with optional type hints and type inference. to ensure calls to Java can avoid reflection.
  Clojure is a dialect lisp, and shares with Lisp the code-as-data philosophy and a powerful of macro system. Clojure is predominatantly a functional programming language, and features a rich set of immutable, persistent data structures. When mutable state is needed, Clojure offers a software transactional memory system and reactive Agent system that ensure clean, correct, multithreaded design.


Regards
Limux



本人正在学习它,我感觉它确实很简洁!


Clojure的语法结构也太不习惯了,比scala还难看~~


简单是要付出代价的,难看更有技术含量噻!
33 楼 Arden 2010-08-17  
mercyblitz 写道
heoxsoft 写道
  Clojure is a dynamic programming language that targets the Java Virtual Machine. It is designed to be a general-propose language, combine the approachability and interactive development of a scripting language with an efficient and robust infrastructure of multithread programming. Clojure is a compliled language - it compiles directly to JVM bytecode. yet remains completely dynamic. Every feature supported by Clojure is supported at runtime. Clojure provides easy access to Java frameworks, with optional type hints and type inference. to ensure calls to Java can avoid reflection.
  Clojure is a dialect lisp, and shares with Lisp the code-as-data philosophy and a powerful of macro system. Clojure is predominatantly a functional programming language, and features a rich set of immutable, persistent data structures. When mutable state is needed, Clojure offers a software transactional memory system and reactive Agent system that ensure clean, correct, multithreaded design.


Regards
Limux



本人正在学习它,我感觉它确实很简洁!


Clojure的语法结构也太不习惯了,比scala还难看~~
32 楼 mercyblitz 2010-08-17  
heoxsoft 写道
  Clojure is a dynamic programming language that targets the Java Virtual Machine. It is designed to be a general-propose language, combine the approachability and interactive development of a scripting language with an efficient and robust infrastructure of multithread programming. Clojure is a compliled language - it compiles directly to JVM bytecode. yet remains completely dynamic. Every feature supported by Clojure is supported at runtime. Clojure provides easy access to Java frameworks, with optional type hints and type inference. to ensure calls to Java can avoid reflection.
  Clojure is a dialect lisp, and shares with Lisp the code-as-data philosophy and a powerful of macro system. Clojure is predominatantly a functional programming language, and features a rich set of immutable, persistent data structures. When mutable state is needed, Clojure offers a software transactional memory system and reactive Agent system that ensure clean, correct, multithreaded design.


Regards
Limux



本人正在学习它,我感觉它确实很简洁!

相关推荐

    谈谈你对JVM的理解?

    谈谈你对JVM的理解?

    23丨如何优化JVM内存分配?.html

    23丨如何优化JVM内存分配?.html

    JVM动态编程语言Soya.zip

    Soya是一门基于JVM上的动态编程语言,现在已经开源 它的特点是  直觉的: 简洁易懂的语法能让您舒服地完成日常所需  OO的: 一切皆为对象  函数式的:提供了必包、柯里化等函数式支持  强大的: 模式...

    基于JVM的编程语言loop.zip

    Loop 是基于 JVM 的编程语言,提供了函数编程特性,简单有趣。Loop 强调可读性、简洁、清晰,侧重于性能和并发性。 示例代码: greet(name) -> "hi, @{name}!" 'Zaphod Beeblebrox'.greet() 标签:loop

    Java虚拟机(JVM)

    在程序运行期间所生成的一个JVM实例。 对JVM规范的的抽象说明是一些概念的集合,它们已经在书《The Java Virtual Machine Specification》(《Java虚拟机规范》)中被详细地描述了;对JVM的具体实现要么是软件,...

    Java语言规范和JVM虚拟机规范.zip

    Java语言规范和JVM虚拟机规范.zip,Oracle官方文档,包括Java语法的定义等内容。Java语言规范包含JDK678三个版本,JVM虚拟机规范包含78两个版本。

    Java语言规范和JVM规范官网文档

    包含有Java6,Java7,Java8,Java9的语言规范和JVM的规范pdf文档,供大家参考,谢谢!深入学习Java编程必须要多看规范,搞清楚深层次的原理。

    莫枢:JVM是多语言的平台

    Oracle JVM编译器团队工程师莫枢在《JVM——多语言的平台》的演讲中,提到Java最强悍的地方在于编译器非常便于应用。而最初定位在为Java提供丰富的功能平台JVM后期走了更为宽广的路线,支持更多的独立语言。有微博...

    JDK、JRE、JVM是什么?

    JDK(java Development Kit):java 的开发和运行环境,包括java 的开发工具和 jre,在程序员的电脑上当然要安装JDK; JRE(Java Runtime Environment):它是Java运行...jdk可以将这个后缀名为java的txt文档,编译成cla

    什么是Java虚拟机(JVM)?——–回过头来看

    Java虚拟机(Java Virtual Machine 简称JVM)是运行所有Java程序的抽象计算机,是Java语言的运行环境,它是Java 最具吸引力的特性之一 Java虚拟机(JVM)一种用于计算机设备的规范,可用不同的方式(软件或硬件)...

    jvm源码jvm源码jvm源码

    jvm源码

    jvm 配置jvm参数

    jvm 配置jvm参数 配置jvm参数

    jvm指令手册 +JVM必知必会,掌握虚拟机编译过程.rar

    JVM是Java Virtual Machine(Java虚拟机)的缩写,JVM是一种用于计算设备的规范,它是一个虚构出来的计算机,是通过在实际的计算机上仿真模拟各种计算机功能来实现的。 引入Java语言虚拟机后,Java语言在不同平台...

    JVM监控实例数 windows监控 线程测试 单例模式下测试JVM实例是否一个

    JVM监控实例数 windows监控 线程测试 单例模式下测试JVM实例是否一个

    JVM规范与深入理解

    JVM规范与深入理解,有JVM规范,有周志明的深入理解JVM。

    jdk,jvm源码

    jvm源码,jvm-native的源码,jvm支行机制,可对jvm的运行过程进行分析 个人网站:https://www.zhangjunbk.com

    magic-script是一款基于JVM的脚本语言.zip

    magic-script是一款基于JVM的脚本语言.zipmagic-script是一款基于JVM的脚本语言.zipmagic-script是一款基于JVM的脚本语言.zipmagic-script是一款基于JVM的脚本语言.zipmagic-script是一款基于JVM的脚本语言.zip

    go语言编写jvm虚拟机

    使用go语言编写的简单的jvm虚拟机,使用go语言编写的简单的jvm虚拟机

    深入JVM内核 - 原理、诊断与优化

    目前,Java是最为流行的编程语言之一,它的基础平台就是JVM。除了Java,如JRuby、Scala、Clojure等语言也运行在JVM平台。熟悉和掌握JVM平台有着重要的实用价值和意义。 在本课程中个,将详细介绍JVM的基本原理、...

    一款基于JVM的脚本语言代码.zip

    一款基于JVM的脚本语言代码.zip一款基于JVM的脚本语言代码.zip一款基于JVM的脚本语言代码.zip一款基于JVM的脚本语言代码.zip一款基于JVM的脚本语言代码.zip一款基于JVM的脚本语言代码.zip一款基于JVM的脚本语言代码....

Global site tag (gtag.js) - Google Analytics