Scala vs. Groovy vs. Clojure

Source: Internet
Author: User

Http://stackoverflow.com/questions/1314732/scala-vs-groovy-vs-clojure

Groovy is a dynamically typed language, whose syntax are very close to Java, with a number of syntax improvements that Allo W for lighter code and less boilerplate. It can run through an interpreter as well as being compiled, which makes it good for fast prototyping, scripts, and Learni ng Dynamic languages without has to learn a new syntax (assuming you know Java). As of Groovy 2.0, it also have growing support for static compilation. Groovy supports closures and have support for programming in a somewhat functional style, although it's still fairly far fr Om the traditional definition of functional programming.

Clojure is a dialect of the Lisp with a few advanced features like software transactional Memory. If you like a Lisp and would like to use something like it under the JVM, Clojure are for you. It's possibly the most functional language running in the JVM, and certainly the most famous one. Also, it has a stronger emphasis on immutability than other Lisp dialects, which takes it closer to the heart of Functiona L Language enthusiasts.

Scala is a fully object oriented language, more so than Java, with one of the most advanced type systems available on non- The languages, and certainly the most advanced type system on the JVM. It also combines many concepts and features of functional languages, without compromising the object orientation, but its Compromise on functional language characteristics put off some enthusiasts of the latter.

Groovy has good acceptance and a popular the web framework in Grails. It also powers the Gradle build system, which is becoming a popular alternative to Maven. I personally think it is a language with limited utility, particularly as Jython and JRuby start making inroads on the JVM -land, compared to the others.

Clojure, even discounting some very interesting features, have a strong appeal just by being a Lisp dialect on JVM. It might limit it popularity, granted, but I expect it would have loyal community around it for a long time.

Scala can compete directly with Java, and give it a run for their money on almost all aspects. It can ' t compete in popularity at the moment, of course, and the lack of a strong corporate backing could hinder its accepta NCE on corporate environments. It's also a much more dynamic language than Java with the sense of the language evolves. From the perspective of the language, that ' s a good thing. From the perspective of users who plan on have thousands of lines of code written in it, no so.

As a final disclosure, I ' m very familiar with Scala, and is acquainted with the other.

Scala vs. Groovy vs. Clojure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.