t******h 发帖数: 120 | 1 最近头让我研究研究脚本语言
google了一下 比较流行的是groovy和scala 各有各的优缺点
大家对这两个语言有啥看法?还有啥jruby jpython之类的如何 |
F****n 发帖数: 3271 | 2 Scala is powerful and fast but too complicated.
Groovy is simple but slow.
jpython has all the weakness of Groovy
jruby is good, but ruby is a old language.
【在 t******h 的大作中提到】 : 最近头让我研究研究脚本语言 : google了一下 比较流行的是groovy和scala 各有各的优缺点 : 大家对这两个语言有啥看法?还有啥jruby jpython之类的如何
|
g*****g 发帖数: 34805 | 3 You probably don't care the speed in scripting, unless we are
talking about web app development.
【在 F****n 的大作中提到】 : Scala is powerful and fast but too complicated. : Groovy is simple but slow. : jpython has all the weakness of Groovy : jruby is good, but ruby is a old language.
|
F****n 发帖数: 3271 | 4 These days performance is important because people start to use scripts in
all kinds of app dev. In fact the No.1 reason that Groovy cannot beat other
competitors is performance. It is too slow and under its current
architecture there's no chance of speeding things up.
【在 g*****g 的大作中提到】 : You probably don't care the speed in scripting, unless we are : talking about web app development.
|
b******y 发帖数: 9224 | 5 I haven't used any of those. But my impression is Scala could be good. The
reason? I've read heated debate on hacker news about Scala vs. some other
languages.
So, I guess Scala could be more popular. |
w**z 发帖数: 8232 | 6 it depends what you want to do. scala is more like functional lang. grovvy
is more like java.
【在 b******y 的大作中提到】 : I haven't used any of those. But my impression is Scala could be good. The : reason? I've read heated debate on hacker news about Scala vs. some other : languages. : So, I guess Scala could be more popular.
|
t***a 发帖数: 416 | 7 我用过scala, groovy和jruby
如果做web开发,jruby可以让你用上ruby on rails,很多人都觉得这是最好的web框架了
但ruby这个语言是个老语言,搞了这么多年,乱七八糟的东西很多,和php一样有很多
native的包,这些东西再和java搅在一起,很乱。。。。而且jruby本身还会继续搞吗?
scala是个新语言,有点复杂,既是OOP,又functional programming, 和java的整合也
非常好。scala的class, trait基本都能和java的class, interface互相对应。而且
scala对actor的实现很好,做些多线程的开发要比jruby和groovy方便,而且性能问题
会少很多。如果做web开发,有个lift框架,我用了两年多了,lift有很多独到功能,
但这个框架还是太小众。
groovy。。。。就是个小玩具,做点测试脚本,简单网站啥的还不错,挺简单的。和
spring等都可以方便整合,我觉得可以作为java项目的一个补充。
【在 t******h 的大作中提到】 : 最近头让我研究研究脚本语言 : google了一下 比较流行的是groovy和scala 各有各的优缺点 : 大家对这两个语言有啥看法?还有啥jruby jpython之类的如何
|
t******h 发帖数: 120 | 8 Thank you guys!
I started working on Scala. |
c*******s 发帖数: 1555 | 9 能展开说说为什么“under its current architecture there's no chance of
speeding things up”?
other
【在 F****n 的大作中提到】 : These days performance is important because people start to use scripts in : all kinds of app dev. In fact the No.1 reason that Groovy cannot beat other : competitors is performance. It is too slow and under its current : architecture there's no chance of speeding things up.
|
F****n 发帖数: 3271 | 10 It is a dynamic script language, which means all its methods and fields are
accessed by a hashtable. It is a pretty dumb design because they should use
interfaces and give people the possibility of implementing index-based
access.
【在 c*******s 的大作中提到】 : 能展开说说为什么“under its current architecture there's no chance of : speeding things up”? : : other
|
|
|
t***a 发帖数: 416 | 11 可有人就爱弱类型啊。。。。
are
use
【在 F****n 的大作中提到】 : It is a dynamic script language, which means all its methods and fields are : accessed by a hashtable. It is a pretty dumb design because they should use : interfaces and give people the possibility of implementing index-based : access.
|
F****n 发帖数: 3271 | 12 It could make strong typing & static accessors as options.
【在 t***a 的大作中提到】 : 可有人就爱弱类型啊。。。。 : : are : use
|
h*i 发帖数: 3446 | 13 Scala不是脚本语言。我觉得Scala和Java的关系就如C++和C的关系。有人会喜欢,大部
分人不会喜欢,太繁了。
有一个语言大家没说,Clojure。这是个纯函数式的语言,学习曲线对一些人可能会比
较陡,需要完全换脑,我刚开始学的时候觉得自己几乎完全不会编程了,呵呵。不过过
了就感到了妙处了...到现在再也不愿意写一行的Java代码了...,特别是在我最近教了
一学期OOP Design Pattern之后,发现大部分Pattern都是用来弥补OOP语言设计的不足
用的。呵呵。
【在 t******h 的大作中提到】 : 最近头让我研究研究脚本语言 : google了一下 比较流行的是groovy和scala 各有各的优缺点 : 大家对这两个语言有啥看法?还有啥jruby jpython之类的如何
|
t***a 发帖数: 416 | 14 scala也是functional的语言,不过它还OO
和你的感受一样,我写多了scala之后,也不愿意写java了
【在 h*i 的大作中提到】 : Scala不是脚本语言。我觉得Scala和Java的关系就如C++和C的关系。有人会喜欢,大部 : 分人不会喜欢,太繁了。 : 有一个语言大家没说,Clojure。这是个纯函数式的语言,学习曲线对一些人可能会比 : 较陡,需要完全换脑,我刚开始学的时候觉得自己几乎完全不会编程了,呵呵。不过过 : 了就感到了妙处了...到现在再也不愿意写一行的Java代码了...,特别是在我最近教了 : 一学期OOP Design Pattern之后,发现大部分Pattern都是用来弥补OOP语言设计的不足 : 用的。呵呵。
|
r*******n 发帖数: 3020 | 15 我也推荐clojure, 语言非常简练, 表达力非常强;;
语法体系和C, Java之类很不同,所以开始学习有点难度。
确切的说, Clojure不是纯函数式的语言,但是它确实函数式语言,具备函数语言的所
有优点。
但是lz是要脚本语言, 我觉得Clojure不是脚本语言,它没有解释器,而是编译成
bytecode。
所以我觉得如果找脚本语言,我认为Jruby或者Jython最适合不过了, 楼上所说的
performance问题根本就不用担心,因为足够用了。
【在 h*i 的大作中提到】 : Scala不是脚本语言。我觉得Scala和Java的关系就如C++和C的关系。有人会喜欢,大部 : 分人不会喜欢,太繁了。 : 有一个语言大家没说,Clojure。这是个纯函数式的语言,学习曲线对一些人可能会比 : 较陡,需要完全换脑,我刚开始学的时候觉得自己几乎完全不会编程了,呵呵。不过过 : 了就感到了妙处了...到现在再也不愿意写一行的Java代码了...,特别是在我最近教了 : 一学期OOP Design Pattern之后,发现大部分Pattern都是用来弥补OOP语言设计的不足 : 用的。呵呵。
|
k*******d 发帖数: 701 | 16 another language
Ceylon
Ceylon is developed by Redhat
http://ceylon-lang.org |
t****a 发帖数: 1212 | 17 agree some of it.
no interpret? REPL!! iclojure!!!
【在 r*******n 的大作中提到】 : 我也推荐clojure, 语言非常简练, 表达力非常强;; : 语法体系和C, Java之类很不同,所以开始学习有点难度。 : 确切的说, Clojure不是纯函数式的语言,但是它确实函数式语言,具备函数语言的所 : 有优点。 : 但是lz是要脚本语言, 我觉得Clojure不是脚本语言,它没有解释器,而是编译成 : bytecode。 : 所以我觉得如果找脚本语言,我认为Jruby或者Jython最适合不过了, 楼上所说的 : performance问题根本就不用担心,因为足够用了。
|
t******h 发帖数: 120 | |
t***a 发帖数: 416 | 19 java到scala要学的东西的太多,而且还是函数式的,思路也得调整。。。。
【在 t******h 的大作中提到】 : scala刚开始学也有点难度 语法太多变了
|
t******h 发帖数: 120 | 20 最近头让我研究研究脚本语言
google了一下 比较流行的是groovy和scala 各有各的优缺点
大家对这两个语言有啥看法?还有啥jruby jpython之类的如何 |
|
|
F****n 发帖数: 3271 | 21 Scala is powerful and fast but too complicated.
Groovy is simple but slow.
jpython has all the weakness of Groovy
jruby is good, but ruby is a old language.
【在 t******h 的大作中提到】 : 最近头让我研究研究脚本语言 : google了一下 比较流行的是groovy和scala 各有各的优缺点 : 大家对这两个语言有啥看法?还有啥jruby jpython之类的如何
|
g*****g 发帖数: 34805 | 22 You probably don't care the speed in scripting, unless we are
talking about web app development.
【在 F****n 的大作中提到】 : Scala is powerful and fast but too complicated. : Groovy is simple but slow. : jpython has all the weakness of Groovy : jruby is good, but ruby is a old language.
|
F****n 发帖数: 3271 | 23 These days performance is important because people start to use scripts in
all kinds of app dev. In fact the No.1 reason that Groovy cannot beat other
competitors is performance. It is too slow and under its current
architecture there's no chance of speeding things up.
【在 g*****g 的大作中提到】 : You probably don't care the speed in scripting, unless we are : talking about web app development.
|
b******y 发帖数: 9224 | 24 I haven't used any of those. But my impression is Scala could be good. The
reason? I've read heated debate on hacker news about Scala vs. some other
languages.
So, I guess Scala could be more popular. |
w**z 发帖数: 8232 | 25 it depends what you want to do. scala is more like functional lang. grovvy
is more like java.
【在 b******y 的大作中提到】 : I haven't used any of those. But my impression is Scala could be good. The : reason? I've read heated debate on hacker news about Scala vs. some other : languages. : So, I guess Scala could be more popular.
|
t***a 发帖数: 416 | 26 我用过scala, groovy和jruby
如果做web开发,jruby可以让你用上ruby on rails,很多人都觉得这是最好的web框架了
但ruby这个语言是个老语言,搞了这么多年,乱七八糟的东西很多,和php一样有很多
native的包,这些东西再和java搅在一起,很乱。。。。而且jruby本身还会继续搞吗?
scala是个新语言,有点复杂,既是OOP,又functional programming, 和java的整合也
非常好。scala的class, trait基本都能和java的class, interface互相对应。而且
scala对actor的实现很好,做些多线程的开发要比jruby和groovy方便,而且性能问题
会少很多。如果做web开发,有个lift框架,我用了两年多了,lift有很多独到功能,
但这个框架还是太小众。
groovy。。。。就是个小玩具,做点测试脚本,简单网站啥的还不错,挺简单的。和
spring等都可以方便整合,我觉得可以作为java项目的一个补充。
【在 t******h 的大作中提到】 : 最近头让我研究研究脚本语言 : google了一下 比较流行的是groovy和scala 各有各的优缺点 : 大家对这两个语言有啥看法?还有啥jruby jpython之类的如何
|
t******h 发帖数: 120 | 27 Thank you guys!
I started working on Scala. |
c*******s 发帖数: 1555 | 28 能展开说说为什么“under its current architecture there's no chance of
speeding things up”?
other
【在 F****n 的大作中提到】 : These days performance is important because people start to use scripts in : all kinds of app dev. In fact the No.1 reason that Groovy cannot beat other : competitors is performance. It is too slow and under its current : architecture there's no chance of speeding things up.
|
F****n 发帖数: 3271 | 29 It is a dynamic script language, which means all its methods and fields are
accessed by a hashtable. It is a pretty dumb design because they should use
interfaces and give people the possibility of implementing index-based
access.
【在 c*******s 的大作中提到】 : 能展开说说为什么“under its current architecture there's no chance of : speeding things up”? : : other
|
t***a 发帖数: 416 | 30 可有人就爱弱类型啊。。。。
are
use
【在 F****n 的大作中提到】 : It is a dynamic script language, which means all its methods and fields are : accessed by a hashtable. It is a pretty dumb design because they should use : interfaces and give people the possibility of implementing index-based : access.
|
|
|
F****n 发帖数: 3271 | 31 It could make strong typing & static accessors as options.
【在 t***a 的大作中提到】 : 可有人就爱弱类型啊。。。。 : : are : use
|
h*i 发帖数: 3446 | 32 Scala不是脚本语言。我觉得Scala和Java的关系就如C++和C的关系。有人会喜欢,大部
分人不会喜欢,太繁了。
有一个语言大家没说,Clojure。这是个纯函数式的语言,学习曲线对一些人可能会比
较陡,需要完全换脑,我刚开始学的时候觉得自己几乎完全不会编程了,呵呵。不过过
了就感到了妙处了...到现在再也不愿意写一行的Java代码了...,特别是在我最近教了
一学期OOP Design Pattern之后,发现大部分Pattern都是用来弥补OOP语言设计的不足
用的。呵呵。
【在 t******h 的大作中提到】 : 最近头让我研究研究脚本语言 : google了一下 比较流行的是groovy和scala 各有各的优缺点 : 大家对这两个语言有啥看法?还有啥jruby jpython之类的如何
|
t***a 发帖数: 416 | 33 scala也是functional的语言,不过它还OO
和你的感受一样,我写多了scala之后,也不愿意写java了
【在 h*i 的大作中提到】 : Scala不是脚本语言。我觉得Scala和Java的关系就如C++和C的关系。有人会喜欢,大部 : 分人不会喜欢,太繁了。 : 有一个语言大家没说,Clojure。这是个纯函数式的语言,学习曲线对一些人可能会比 : 较陡,需要完全换脑,我刚开始学的时候觉得自己几乎完全不会编程了,呵呵。不过过 : 了就感到了妙处了...到现在再也不愿意写一行的Java代码了...,特别是在我最近教了 : 一学期OOP Design Pattern之后,发现大部分Pattern都是用来弥补OOP语言设计的不足 : 用的。呵呵。
|
r*******n 发帖数: 3020 | 34 我也推荐clojure, 语言非常简练, 表达力非常强;;
语法体系和C, Java之类很不同,所以开始学习有点难度。
确切的说, Clojure不是纯函数式的语言,但是它确实函数式语言,具备函数语言的所
有优点。
但是lz是要脚本语言, 我觉得Clojure不是脚本语言,它没有解释器,而是编译成
bytecode。
所以我觉得如果找脚本语言,我认为Jruby或者Jython最适合不过了, 楼上所说的
performance问题根本就不用担心,因为足够用了。
【在 h*i 的大作中提到】 : Scala不是脚本语言。我觉得Scala和Java的关系就如C++和C的关系。有人会喜欢,大部 : 分人不会喜欢,太繁了。 : 有一个语言大家没说,Clojure。这是个纯函数式的语言,学习曲线对一些人可能会比 : 较陡,需要完全换脑,我刚开始学的时候觉得自己几乎完全不会编程了,呵呵。不过过 : 了就感到了妙处了...到现在再也不愿意写一行的Java代码了...,特别是在我最近教了 : 一学期OOP Design Pattern之后,发现大部分Pattern都是用来弥补OOP语言设计的不足 : 用的。呵呵。
|
k*******d 发帖数: 701 | 35 another language
Ceylon
Ceylon is developed by Redhat
http://ceylon-lang.org |
t****a 发帖数: 1212 | 36 agree some of it.
no interpret? REPL!! iclojure!!!
【在 r*******n 的大作中提到】 : 我也推荐clojure, 语言非常简练, 表达力非常强;; : 语法体系和C, Java之类很不同,所以开始学习有点难度。 : 确切的说, Clojure不是纯函数式的语言,但是它确实函数式语言,具备函数语言的所 : 有优点。 : 但是lz是要脚本语言, 我觉得Clojure不是脚本语言,它没有解释器,而是编译成 : bytecode。 : 所以我觉得如果找脚本语言,我认为Jruby或者Jython最适合不过了, 楼上所说的 : performance问题根本就不用担心,因为足够用了。
|
t******h 发帖数: 120 | |
t***a 发帖数: 416 | 38 java到scala要学的东西的太多,而且还是函数式的,思路也得调整。。。。
【在 t******h 的大作中提到】 : scala刚开始学也有点难度 语法太多变了
|
p*****2 发帖数: 21240 | 39
架了
吗?
play2+scala怎么样?
【在 t***a 的大作中提到】 : 我用过scala, groovy和jruby : 如果做web开发,jruby可以让你用上ruby on rails,很多人都觉得这是最好的web框架了 : 但ruby这个语言是个老语言,搞了这么多年,乱七八糟的东西很多,和php一样有很多 : native的包,这些东西再和java搅在一起,很乱。。。。而且jruby本身还会继续搞吗? : scala是个新语言,有点复杂,既是OOP,又functional programming, 和java的整合也 : 非常好。scala的class, trait基本都能和java的class, interface互相对应。而且 : scala对actor的实现很好,做些多线程的开发要比jruby和groovy方便,而且性能问题 : 会少很多。如果做web开发,有个lift框架,我用了两年多了,lift有很多独到功能, : 但这个框架还是太小众。 : groovy。。。。就是个小玩具,做点测试脚本,简单网站啥的还不错,挺简单的。和
|
z****e 发帖数: 54598 | 40 scala -> akka
groovy -> grails
否则还不如用java自己去写去 |
|
|
t***a 发帖数: 416 | 41 这没试过啊。。。。。但也想不出什么优势啊。。。而且这么干的人也少,出了问题找
谁去
【在 p*****2 的大作中提到】 : : 架了 : 吗? : play2+scala怎么样?
|
t***a 发帖数: 416 | 42 那得看做啥,用scala的话,有没有akka都行,可是groovy如果不用grails,这热量可
就不大了
【在 z****e 的大作中提到】 : scala -> akka : groovy -> grails : 否则还不如用java自己去写去
|
p*****2 发帖数: 21240 | 43
感觉现在推荐play2的比lift多呀?想过几天看看Play怎么玩。
【在 t***a 的大作中提到】 : 这没试过啊。。。。。但也想不出什么优势啊。。。而且这么干的人也少,出了问题找 : 谁去
|
z****e 发帖数: 54598 | 44 如果不用akka,其它的部分相比起用java,是否有优势呢?
因为java有很多现成的工具可以直接用,比如common math
不需要自己去实现,用就行了,哪怕用scala实现起来会容易
但是实现容易也比不上直接用方便阿
j2ee无法涵盖到的地方主要就是core java的部分
那这个部分多线程是一个比较头疼的问题,akka比较好地解决了这个问题
【在 t***a 的大作中提到】 : 那得看做啥,用scala的话,有没有akka都行,可是groovy如果不用grails,这热量可 : 就不大了
|
g*****g 发帖数: 34805 | 45 Scala is a fine language. But it'll remain a niche language. It's very
powerful, but at the same time, it's very complicated. You can call Java API
directly from Scala and vice versa, which is not an issue. Most libraries
wouldn't need to be rewritten.
But let's make one thing clear. It's not easier to write an arbitrary
component in Scala. Akka and Actor framework is something special, there's
already Erlang for Ericsson proving FP is a good fit for this. But in most
other areas, Java is better for its simple syntax, huge pool of talents etc.
The quality of a project is not often determined by the best engineer in
your team, it's most often determined by the worst one. That's why Java is a
better fit for most projects than Scala.
You may feel cool writing Scala, but Java is more practical for average joes.
【在 z****e 的大作中提到】 : 如果不用akka,其它的部分相比起用java,是否有优势呢? : 因为java有很多现成的工具可以直接用,比如common math : 不需要自己去实现,用就行了,哪怕用scala实现起来会容易 : 但是实现容易也比不上直接用方便阿 : j2ee无法涵盖到的地方主要就是core java的部分 : 那这个部分多线程是一个比较头疼的问题,akka比较好地解决了这个问题
|
t***a 发帖数: 416 | 46 akka比较好解决多线程问题,是因为它实现了actor模式,能给scala和java用
这对java当然是雪中送炭,可是scala自己本身就有一个actor的实现,使用起来和akka
的actor一样,所以我才说scala并不是那么需要akka
java的类库,scala都能调用,反过来也一样,这也是为什么akka一个jar包,能同时给
java和scala用的原因
至于那个语言更有优势,那说起来就没边了,要是我说,那就是PHP才是人类最好的编
程语言!
【在 z****e 的大作中提到】 : 如果不用akka,其它的部分相比起用java,是否有优势呢? : 因为java有很多现成的工具可以直接用,比如common math : 不需要自己去实现,用就行了,哪怕用scala实现起来会容易 : 但是实现容易也比不上直接用方便阿 : j2ee无法涵盖到的地方主要就是core java的部分 : 那这个部分多线程是一个比较头疼的问题,akka比较好地解决了这个问题
|
z****e 发帖数: 54598 | 47 php是最便宜的web工具
我不反对在必要时候把web server全都搞成php,因为便宜很多
可以用jar是可以,但是一个文件里面同时出现两种语言,那就丑陋了
就像jsp一样,很多时候都在逐步淘汰这种混合编码的形式
看了下spring对于scala的支持,貌似还处于起步阶段
那这个就比较痛苦了,因为现在接受一个新生事务
更多的不是看这个新东西的功能,而是看它能否利用起那些现有的工具
grails也是因为跟spring还有hibernate的协作良好才逐步推广开来的
语言的feature只是冰山一角,最重要的还是协作
还是要看周边各种软件对这个语言的支持程度如何
akka
【在 t***a 的大作中提到】 : akka比较好解决多线程问题,是因为它实现了actor模式,能给scala和java用 : 这对java当然是雪中送炭,可是scala自己本身就有一个actor的实现,使用起来和akka : 的actor一样,所以我才说scala并不是那么需要akka : java的类库,scala都能调用,反过来也一样,这也是为什么akka一个jar包,能同时给 : java和scala用的原因 : 至于那个语言更有优势,那说起来就没边了,要是我说,那就是PHP才是人类最好的编 : 程语言!
|