z****e 发帖数: 54598 | 1 I would say it depends on your experience and your goals. Groovy would be
the easiest transition, and if you don't already know a good dynamic
language this would be a good one. You can basically start with Java and
then "Groovify" it, and it is the only language with a joint compiler to
compile your Groovy and Java all at once. You can easily extend a Java class
with Groovy, and then extend that Groovy with Java. Try that in any other
JVM language. Given that Groovy was acquired by SpringSource, and how well
it mixes with Java, I get the feeling its going to become the language used
most alongside Java. At least in the short term. Even just as a replacement
for xml configurations, it has a lot to offer.
When it comes down to it, Groovy, Jython and JRuby, JavaScript are really
all the same. They have some differences in syntax, and some slight feature
differences, but in the grand scheme of programming languages, it doesn't
amount to much more than personal preference. Of those, if you're a Java
programmer, I think Groovy is the best because it was really built to work
well with Java and I think there's a real benefit to learning and using it
as a tool. JRuby and Jython are really just nice so that you have access to
the JVM and Java libraries from a language you prefer.
If you really want to try something new and possibly mind expanding, I would
go with Scala or Clojure. Functional programming has a lot of buzz lately,
especially because of the benefits in regards to concurrent programming.
Both Scala and Clojure are well suited to this domain, though I think
Clojure wins here. I think both languages are really well done, and you
should probably learn both ;) If I were going to pick one to start with, I
would say that Clojure would be simpler to learn completely (its a Lisp, so
there's not much in terms of syntax), but I suppose Lisp is one of those
easy to learn, difficult to master ind of things.
Scala is the opposite. It is a wealth of syntax. It has so many features, it
will take you a long time to explore all of them. However, a lot of people
really do see Scala as the future of the JVM. It's the only one that is
statically typed. It has good integration with Java (though not as good as
Groovy). It has decent IDE support, getting better all the time. And it
really is a fundamentally different paradigm from Java. You will expand your
brain from using it. You likely won't want to go back to Java afterwards :)
If I were going to pick just one of all of these to learn, I would go with
Scala. If you just want to learn one new language now to test the waters, I
would go with Groovy. | z****e 发帖数: 54598 | 2 简单说
groovy == javascript == jython == jruby
区别只是语法上的区别,都是脚本
scala想做better java,但是其实没那么容易
太多paradigm凑在一起会思维错乱的
clojure是lisp,这个其实是学术派小众的东西
别太当真,你不是做叫兽的话,其实用不了太多 |
|