Outside Java, is it Scala or Groovy? Reproduced

Source: Internet
Author: User

Original address

Both Scala and Groovy are JVM-based languages, and they are more concise and expressive than Java. Scala and Groovy are good choices for developers who want to avoid Java tedious statements without leaving the JVM open. But which one will be able to get ahead in the future development process? Which is the direction of future development?

Earlier last year, an article called "Scala,groovy's killer?" "Blog's comparison of Scala and Groovy:

The core difference between Scala and Groovy is that the former is statically typed. Some people may argue that this makes it more complicated to achieve scripting goals, and that scripting is the motivation of Groovy. However, Scala has a complete system feature, which makes Groovy look more like a toy. For example, Scala has "sequence comprehensions". This feature results in a very compact and powerful representation of the algorithm.

Scala also has more features that prove to be very useful, such as nested classes, currying, and algebraic type pattern matching. It also supports the addition of generics and annotations similar to JDK1.5. These are just the tip of the iceberg.

After that, Derek Young wrote "Scala vs. Groovy: Static typing is the key to Performance" (Scala-vs-groovy-static-typing-is-key-to-performance). In this article, he gave a practical example to illustrate that Scala's performance is much higher than Groovy for the same algorithm.

However, Scala is not perfect, and it has some obvious flaws. In a recent blog post, Rick Hightower sharply criticized Scala's grammatical problems:

Scala is not a better choice. After reading the Scala document, my idea is that although the language's features sound good, the syntax makes me want to give up. Why do things have to be different to each other? Scala makes Groovy look more palatable than ever.

Hatred is a very strong word. I hate Scala's grammar. Please don't push this grammar any further. ...... Does Scala have a good idea? Yes. You can borrow it.

In a word, Scala looks like the next over-advertised language. Just bring the essence into Groovy and throw away the bad grammar. My favorite Scala feature is the inference type and the strong type. C#3.0 also have these. (I don't use C #, not necessarily I don't like some of its features.) )

Rick Hightower also suggested that Sun should invest in Groovy rather than make a pointless investment in JRuby.

Groovy is more Java-like, easier to get started with, and the syntax is not offensive to developers. Why does Sun spend so much money on the JRuby?

Investment should be given to Groovy. Developers who know Java this way can learn Groovy more quickly and are more likely to do so if they have tools to support them.

To illustrate the unwise use of Sun's investments in Ruby, Rick Hightower also cited a statistical chart to illustrate whether the company is using Ruby as a trend or less:

In addition, both Ruby, Scala, and Groovy have corresponding WEB frameworks, and the corresponding frameworks are written in their respective languages. These frameworks are Rails, Lift, and Grails, respectively. Although many of Lift and Grails are borrowed from Rails, Grails has inherited a good deal of other Java technology frameworks, which will undoubtedly protect users or vendors from investing in this area. This is described in the Grails Framework reference documentation:

Grails builds on these concepts and significantly reduces the complexity of building Web applications on the Java platform. The difference is that these are based on established Java technologies such as Spring and Hibernate.

Currently,Scala and Groovy two languages are in the process of rapid development. The advantage of Groovy, as it stands today, is ease of use and seamless integration with Java, and Scala's advantages lie in performance and some advanced features. If the two can learn from each other's merits to enrich themselves in the process of development, it is undoubtedly the gospel for the developers. As the blog author cited in the first article said last:

Instead of seeing a desperate struggle, we want to see a more pragmatic groovy team working with a more academic Scala team to create a powerful and easy-to-use language.

Who are you going to bet on?

Outside Java, is it Scala or Groovy? Reproduced

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.