- 浏览: 308214 次
- 性别:
- 来自: 天津
文章分类
最新评论
-
suxiaojack:
15题,就是拿杨辉三角填充空格,答案应该是C(38,19)吧? ...
Project Euler解题汇总 013 ~ 022 -
songhaikang:
这篇文章挺好的,跟着你的步骤很快就可以入门了。非常感谢。
[转贴]Derby入门 —— (1) -
Eastsun:
呵呵,我没有Android的机器,所以兴趣不大
使用Java写的GVmaker虚拟机(开源) -
crapricorn:
那个版本的用不了虚拟键盘啊 呵呵 我们的手机没有实体键盘呀 所 ...
使用Java写的GVmaker虚拟机(开源) -
Eastsun:
crapricorn 写道希望sun侠能做出个android平 ...
使用Java写的GVmaker虚拟机(开源)
原文地址:Groovy, JRuby, Jython, Scala: Who Wins the Script Bowl?
简介: 这是一场关于脚本语言的“擂台赛”(严格说,Scala应该不属于脚本语言), Guillaume LaForge代表Groovy,Charles Nutter代表JRuby,Frank Wierzbicki代表Jython以及Jorge Ortiz代表Scala。他们展开了三轮的竞赛,每次比赛他们都需要展示一个Demo,然后有三分钟的时间向观众解说这个Demo,而观众可以通过短信对比赛进行投票。
这三轮比赛包括一个桌面应用,一个Web应用,以及一个自由发挥的项目用来展示各个脚步语言最擅长的东东。擂台赛的最后结果是:JRuby获得了第一,Groovy其次,然后是Scala与Jython。
A=Groovy, B=JRuby, C=Jython, D=Scala
我因为对c++泛型支持的不足,c++ 0把concept剔出标准而找一个可以替代的语言,
scala非常符合我的需求,他很自然,符合人的思维表达方式,而又有性能的保障;
我非常喜欢scala,不过有scala插件的eclipse的ide做的不好,似乎连语法高亮都没有支持,
如果ide上scala有一个提升就非常完美了
简介: 这是一场关于脚本语言的“擂台赛”(严格说,Scala应该不属于脚本语言), Guillaume LaForge代表Groovy,Charles Nutter代表JRuby,Frank Wierzbicki代表Jython以及Jorge Ortiz代表Scala。他们展开了三轮的竞赛,每次比赛他们都需要展示一个Demo,然后有三分钟的时间向观众解说这个Demo,而观众可以通过短信对比赛进行投票。
这三轮比赛包括一个桌面应用,一个Web应用,以及一个自由发挥的项目用来展示各个脚步语言最擅长的东东。擂台赛的最后结果是:JRuby获得了第一,Groovy其次,然后是Scala与Jython。
A=Groovy, B=JRuby, C=Jython, D=Scala
引用
Wednesday's Script Bowl was indeed what the caption promised, a rapid-fire comparison of scripting languages. Four developers took on the challenge to convince the audience of their language of choice -- in only three minutes per round. Guillaume LaForge represented Groovy, Charles Nutter represented JRuby, Frank Wierzbicki represented Jython, and Jorge Ortiz represented Scala.
All four languages compile to Java bytecode, but what distinguishes them? The jury, made up of Roberto Chinnici, Carol McDonald, and Ola Bini, made the four contestants compete in three categories: Each developer had prepared three demos, a desktop application, a web application, and one free-form app that shows off what the particular scripting language does best. After each round, the host Rags Srinivas encouraged the attendees to vote by sending text messages.
The rich client app demos were first. The task was to implement a desktop client that allows you to log on to Twitter and view your friends' feeds and status, and search for text in their postings. The ability to post was not required, but some of the demo'ed clients could.
The Groovy implementation clearly followed the MVC pattern and the language features made it very easy to parse the XML input; the GUI made a good impression. The JRuby implementation was designed using the NetBeans GUI builder (Matisse) and the Profligacy library, and therefor looked like a native app on MacOS; the users of this JRuby app will also appreciate that the build script generated native executables for different operating systems. The Jython app could save time by reusing an already existing model for accessing Twitter APIs; still the app was an odd one out, since it had to be started from the Terminal, and despite having a GUI with buttons to select Twitterers, the output was printed to the Terminal (frankly it looked as if he didn't have time to complete the UI). The Scala developer got started quickly by extending a SimpleGuiApplication class for desktop apps; Scala also made it easy to parse XML input, and the jury pointed out the clean error handling.
Next came the web applications. The application should access a MySQL database containing a world factbook, allow the user to browse facts about countries, and sort entries by criteria (language, population, etc). Additionally it should display the selected cities on a map.
The Groovy developer of course relied on the Grails framework together with Hibernate to access the database. The web application contributed by the JRuby community relied on the Rails framework and hooked up the components using the NetBeans IDE. The Jython web application relied on the Django framework with good-looking results. All three web applications made good use of their respective web frameworks and came with nice user-friendly web interfaces. Only the Scala team failed to produce the required web application and lost votes accordingly; instead, they demo'ed two other web apps, a chat client and a task list that use Ajax to keep the view up-to-date.
A quick look at the votes shows that JRuby and Groovy are presently the most popular choices in the audience... Will Scala and Jython catch up in the last round, where each team gets a chance to show off what their language can do best?
The Groovy representative decides not to show off demo apps, but instead he convinces the audience by talking about the seamless Java integration that Groovy is famous for. But then the JRuby submissions wow the audience with their smooth visual beauty: The first demo is a Star Wars-like scrolling Twitter client; the second demo is a 'Face For Steven Hawkins', a flock of colored dots that vibrate and change colors in response to audio input. Yes, admittedly, not very useful, but... pretty! The Jython representative chose to demo the Terminal-based Python help system that will soon be integrated into Jython too. The Scala demo was an application that searches and counts words in RSS feeds; it showed very well how Scala handles concurrency in minithreads.
Before the results were made public, the audience had a chance to pose questions to the experts. Asked about the relation of JavaFX to the other languages demonstrated today, Charles Nutter explained that each language was justified by its unique approach, so he does not see JavaFX as competition, but a powerful contribution to the variety of scripting languages. Another attendee asked how exactly languages such as Scala integrate with Java? All scripts written in these four languages compile to Java bytecode (war or jar files) that run on the standard JVM. Regarding Scala, Jorge Ortiz remarked that calling Java libraries from Scala apps is however easier than calling Scala from Java apps.
Finally, Rags announces the winner: JRuby! Groovy comes second, then Scala, and Jython (Check the final results in Rags' Blog, A=Groovy, B=JRuby, C=Jython, D=Scala). Jython had produced good results, but may have lost a few points for the terminal hacking required to start the applications, since all other contestants used IDEs. Although it felt a bit rushed and it was sometimes hard to pick up the details, this format of comparison is very suitable to get an overview of the "contestants".
All four languages compile to Java bytecode, but what distinguishes them? The jury, made up of Roberto Chinnici, Carol McDonald, and Ola Bini, made the four contestants compete in three categories: Each developer had prepared three demos, a desktop application, a web application, and one free-form app that shows off what the particular scripting language does best. After each round, the host Rags Srinivas encouraged the attendees to vote by sending text messages.
The rich client app demos were first. The task was to implement a desktop client that allows you to log on to Twitter and view your friends' feeds and status, and search for text in their postings. The ability to post was not required, but some of the demo'ed clients could.
The Groovy implementation clearly followed the MVC pattern and the language features made it very easy to parse the XML input; the GUI made a good impression. The JRuby implementation was designed using the NetBeans GUI builder (Matisse) and the Profligacy library, and therefor looked like a native app on MacOS; the users of this JRuby app will also appreciate that the build script generated native executables for different operating systems. The Jython app could save time by reusing an already existing model for accessing Twitter APIs; still the app was an odd one out, since it had to be started from the Terminal, and despite having a GUI with buttons to select Twitterers, the output was printed to the Terminal (frankly it looked as if he didn't have time to complete the UI). The Scala developer got started quickly by extending a SimpleGuiApplication class for desktop apps; Scala also made it easy to parse XML input, and the jury pointed out the clean error handling.
Next came the web applications. The application should access a MySQL database containing a world factbook, allow the user to browse facts about countries, and sort entries by criteria (language, population, etc). Additionally it should display the selected cities on a map.
The Groovy developer of course relied on the Grails framework together with Hibernate to access the database. The web application contributed by the JRuby community relied on the Rails framework and hooked up the components using the NetBeans IDE. The Jython web application relied on the Django framework with good-looking results. All three web applications made good use of their respective web frameworks and came with nice user-friendly web interfaces. Only the Scala team failed to produce the required web application and lost votes accordingly; instead, they demo'ed two other web apps, a chat client and a task list that use Ajax to keep the view up-to-date.
A quick look at the votes shows that JRuby and Groovy are presently the most popular choices in the audience... Will Scala and Jython catch up in the last round, where each team gets a chance to show off what their language can do best?
The Groovy representative decides not to show off demo apps, but instead he convinces the audience by talking about the seamless Java integration that Groovy is famous for. But then the JRuby submissions wow the audience with their smooth visual beauty: The first demo is a Star Wars-like scrolling Twitter client; the second demo is a 'Face For Steven Hawkins', a flock of colored dots that vibrate and change colors in response to audio input. Yes, admittedly, not very useful, but... pretty! The Jython representative chose to demo the Terminal-based Python help system that will soon be integrated into Jython too. The Scala demo was an application that searches and counts words in RSS feeds; it showed very well how Scala handles concurrency in minithreads.
Before the results were made public, the audience had a chance to pose questions to the experts. Asked about the relation of JavaFX to the other languages demonstrated today, Charles Nutter explained that each language was justified by its unique approach, so he does not see JavaFX as competition, but a powerful contribution to the variety of scripting languages. Another attendee asked how exactly languages such as Scala integrate with Java? All scripts written in these four languages compile to Java bytecode (war or jar files) that run on the standard JVM. Regarding Scala, Jorge Ortiz remarked that calling Java libraries from Scala apps is however easier than calling Scala from Java apps.
Finally, Rags announces the winner: JRuby! Groovy comes second, then Scala, and Jython (Check the final results in Rags' Blog, A=Groovy, B=JRuby, C=Jython, D=Scala). Jython had produced good results, but may have lost a few points for the terminal hacking required to start the applications, since all other contestants used IDEs. Although it felt a bit rushed and it was sometimes hard to pick up the details, this format of comparison is very suitable to get an overview of the "contestants".
评论
11 楼
lzycxy
2009-09-08
scala绝对值得你去学习
10 楼
rovanz
2009-08-16
scala is wonderful
9 楼
bneliao
2009-07-25
我因为对c++泛型支持的不足,c++ 0把concept剔出标准而找一个可以替代的语言,
scala非常符合我的需求,他很自然,符合人的思维表达方式,而又有性能的保障;
我非常喜欢scala,不过有scala插件的eclipse的ide做的不好,似乎连语法高亮都没有支持,
如果ide上scala有一个提升就非常完美了
8 楼
guava
2009-07-22
真正的项目里有用到这些语言吗?
7 楼
徐风子
2009-07-21
groovy和java最亲近,学习曲线很小,可以一上手就用。
scala最有前途,之前不看好静态语言,但学了scala以后才知道静态语言原来还是大有作为的。 scala主要问题是语法太奇怪,学习曲线太大,但你习惯了以后就会喜欢上他了。
scala最有前途,之前不看好静态语言,但学了scala以后才知道静态语言原来还是大有作为的。 scala主要问题是语法太奇怪,学习曲线太大,但你习惯了以后就会喜欢上他了。
6 楼
Eastsun
2008-10-17
Netbeans上的Scala插件很不错啊
5 楼
aninfeel
2008-10-16
scala很不错啊,可惜编辑器支持太少了
4 楼
Arden
2008-06-15
还是喜欢groovy,groovy调用java库非常方便。
3 楼
gm8pleasure
2008-05-20
Scala太诡异了
2 楼
jolestar
2008-05-13
呵呵,这样的比赛有趣。
1 楼
Kaede
2008-05-13
不知道为什么要用这些 脚本语言!
项目代码维护 多了一项,项目中多了一份依赖:(
项目代码维护 多了一项,项目中多了一份依赖:(
发表评论
-
JavaFX1.2的性能貌似有了很大的提升
2009-06-03 09:36 1981Osvaldo Pinali Doederlein's B ... -
Java.next:第二部分——与Java互操作
2008-09-19 23:05 1875原文地址:Java.next #2: Java Inter ... -
Java.next:第一部分——共同点
2008-09-19 13:31 1540原文地址:Java.next: Common Ground ... -
隐式转换:比动态类型更强大?
2008-09-16 18:37 1671本文内容主要来自Implicit Conversions: ... -
澄清:Java中只有按值传递,没有按引用传递!
2008-07-13 22:23 3982前言:在JAVA面试题解惑系列(五)——传了值还是传了引用 ... -
Ruby,Python不能威胁到Java的13个理由
2008-05-28 22:50 1481最近,danielstoner发表了一篇题为13 reas ... -
Java:进化的尽头
2008-05-28 17:45 1304原文地址:http://blog. ... -
《Effective Java》: Joshua Bloch访谈
2008-05-23 00:52 2613原文地址:Effective ... -
JSR 308:Java语言复杂度在恣意增长?
2008-05-20 13:54 1759原帖地址:http://www ... -
Sun能否让Java重振雄风?
2008-05-13 14:42 0原文地址:Can Sun rejuvenate Java? ... -
JAVA比C++更快?
2008-04-08 15:03 2042首先:我必须承认,我取JA ... -
在J2ME中模拟C语言中的文件操作
2008-02-27 00:09 1615最近在写一个模拟器(OR虚拟机),用于运行文曲星(一种 ... -
使用StAX解析XML:使用定制事件和编写 XML
2007-10-12 23:01 2103除了提供一个低层的基 ... -
使用StAX解析XML: 拉式解析和事件
2007-10-08 20:53 33042007 年 7 月 05 日 Streaming API ... -
[转载]Streaming API for XML (StAX) 简介
2007-10-07 13:35 2306Streaming API for XML (StAX) 是用 ... -
使用CookieHandler管理Cookie数据
2007-05-31 23:22 10885前言 : 因为只学过J2SE部分,对JAVA网络编程也不甚了 ... -
浅谈HTTP的无状态性
2007-05-30 01:26 2033HTTP是Hyper Text Transf ... -
用动态代理进行修饰
2007-04-11 16:26 1847动态代理为实 ... -
一种得到代码所在行号的方法
2007-04-02 20:03 3919RT,今天在论坛上看到有人提出这个问题,马上联想 ... -
网络词汇表
2007-04-01 13:33 1996【协议 】--- protocol,指通信双方通信时遵守的一 ...
相关推荐
8. **Groovy, JRuby, Jython, Scala:谁是胜利者?**: - 这篇文章可能分析了这些JVM上的动态语言,讨论了各自的优缺点,以及它们在不同场景下的适用性。 9. **《Effective Java》:Joshua Bloch访谈**: - ...
4. Scala:基于JVM的静态类型语言,支持面向对象编程和函数式编程。 5. Clojure:基于JVM的动态类型语言,支持函数式编程和基于宏的 metabrogramming。 Java平台的多语言混合编程的未来发展趋势是: 1. 软件项目的...
不过,Java生态系统中有多种脚本语言可以运行在Java平台上,例如Groovy、JRuby等。下面将详细介绍这些概念和技术。 ### Java与脚本语言 #### Java简介 Java是一种广泛使用的通用编程语言,由Sun Microsystems开发...
例如,Kotlin在Android开发中受到青睐,Scala在大数据处理领域广泛应用,而Jython和JRuby则为那些希望在Java平台上使用Python或Ruby语法的开发者提供了便利。了解并熟练掌握这些非Java语言,可以极大地拓宽开发者在...
- **多语言支持**:除了Java之外,JavaFX 2.0还支持其他运行在Java虚拟机(JVM)上的语言,如Visage、Jython、Groovy、JRuby和Scala等,这增加了其灵活性和适用范围。 - **企业级应用**:Oracle公司明确表示,JavaFX...
language、CAL、Aardappel、Funnel、MiniPLAN、SixxBDC Scheme、ABCL、Lisp、...Groovy、Nice、Scala、Anvil、Self、Hojo、Correlate、MetaJS、Sather、Quercus、FScript、Sleep、WLShell、JudoScript、JRuby、Jickle、...
JavaFX 2.0的关键架构策略包括对现有Java库的再利用和与其他运行在Java虚拟机(JVM)上的语言(如Visage、Jython、Groovy、JRuby和Scala)之间的通信桥接。这种设计思路使得JavaFX能够更好地融入现有的Java生态系统...
1. **多语言支持**:Java 7增加了对其他编程语言的支持,如Scala、Groovy等,通过JVM上的语言互操作性(JRuby, Jython等),使得开发者可以更灵活地选择编程语言。 2. **类型推断**:Java 7引入了钻石操作符(),...
除了Java,JVM还支持Kotlin、Groovy、JRuby、Jython、Scala等其他语言。值传递和引用传递是参数传递的两种方式,Java中所有参数传递都是值传递,即使是对象也是对象引用的副本。 Java的基本数据类型有8种,包括整型...
4. **动态类型语言支持**:如Groovy、Scala等,可以通过JRuby或Jython支持动态语言。 5. **字符串改进**:如`switch`语句支持字符串,`String`的`split()`方法性能提升等。 了解和掌握JDK的使用是成为Java开发者的...
- JVM还支持其他语言,如Kotlin、Groovy、JRuby、Jython和Scala。 2. **基础知识**: - **基本数据类型**包括整型(byte、short、int、long)、浮点型(float、double)、布尔型(boolean)和字符型(char)。...
它可以编译任何可编译为Java字节码的语言,例如Clojure,Groovy,JRuby,Jython,Kotlin和Scala。 作为输出,它生成二进制格式(.wasm文件)或文本格式(.wat文件)。 目标是通过WebAssembly在浏览器中本机运行Java...
脚本编写器 用于 servlet webapps 的 REST 远程脚本。 支持的语言:Javascript (Rhino)、Groovy、BeanShell ... 即将推出:Scala、JRuby、Jython。 使用 Spray.io、Akka、AngularJS 和 Ace 编辑器在 Scala 中实现。
JVM平台经历了编程语言的巨大变化,出现了许多新的语言,包括动态语言如Javascript、Jruby、Jython、Groovy,以及函数式与面向对象兼具的Scala。这些语言为Java平台上多语言混合编程的发展提供了坚实的技术基础。每...
这一平台为各种其他语言如Groovy、Scala、JRuby、Jython、Clojure、Ceylon和Kotlin等提供了运行环境,形成了丰富的生态系统。这些语言在保留Java平台优势的同时,也引入了各自的特性和语法糖,满足不同开发者的需求...
例如Scala、Groovy、JRuby、Jython和Clojure等众多语言都可以在JVM上运行,并能够充分利用JVM的许多特性以及标准Java库和无数由个人和组织创建的定制库。 然而,近年来Google却逐渐偏离了这一趋势,开始创建非标准...
在“后Java时代”,作者可能探讨了诸如Scala、Kotlin、Groovy等现代JVM语言,它们在语法简洁性、类型系统、函数式编程特性等方面对Java进行了改进。此外,也可能提到了跨语言集成,如使用Jython或JRuby实现动态脚本...