Scala"", "Sans-serif" '> and groovy are both JVM-based languages, which have more concise syntax and rich expression capabilities than Java. Scala and groovy are good choices for developers who want to avoid tedious Java statements without leaving the JVM. But which one can take the lead in the future development process? Which one is the future development direction? These are problems that plague developers.
Earlier last year, an article named "Scala, groovy killer? The blog compares Scala and GROOVY:
Scala"Groovy", "Sans-serif" '> the core difference with groovy is that the former is static. Some may argue that this makes it more complicated to achieve the scripted goal, and scripted is the motivation of groovy. Scala, however, has a complete system feature that makes groovy look more like a toy. For example, scala has "sequence comprehensions ". This factor makes the expression of the algorithm very compact and powerful.
Scala"", "Sans-serif" '> more proven features, such as Nested classes, currying, and algebraic pattern matching. It also supports generics and annotations similar to that added by jdk1.5. These are just the tip of the iceberg.
Later, Derek
Young wrote "Scala vs. GROOVY: static types are the key to performance ". In this article, he gave a practical example to illustrate that Scala's performance is much higher than groovy's for the same algorithm.
However, Scala is not perfect, and it also has some obvious defects. Rick Hightower sharply criticized Scala syntax in a recent blog:
Scala"", "Sans-serif" '> is not a better choice. After reading Scala's documentation, I thought: although the features of this language sound quite good, the syntax gave up. Why do things have to be different for different purposes? Scala makes groovy look more delicious than before.
Hate is a strong word. I hate Scala syntax. Please stop promoting this syntax ....... Is Scala a good idea? Yes. Just borrow it ......
All in all, scala looks like the next language that has been overly publicized. You just need to introduce the essence to groovy and then throw those bad syntaxes. My favorite Scala features are reasoning type and strong type. C #3.0. (I don't need C #, so I don't like some of its features .)
Rick Hightower"", "Sans-serif" '> we also recommend that sun invest in groovy instead of making unnecessary investments in jruby.
Groovy"", "Sans-serif" '> it is more like Java, easier to use, and does not dislike the syntax. Why does Sun invest so much money in jruby?
The investment should be made to groovy. So that Java developers can learn groovy faster, and if there are tools to support them, it is more likely to do so.
To demonstrate Sun's unwise investment in ruby, Rick Hightower also cited a Statistical Chart to show that the trend of Ruby adoption is still relatively low:
In addition, Ruby, Scala, and groovy all have corresponding web frameworks, and the corresponding frameworks are written in their respective languages. These frameworks are rails, lift, and grails. Although many items in lift and grails are referenced by rails, grails inherits other existing Java technical frameworks, this will undoubtedly protect users' or manufacturers' existing investments in this area. The grails framework is described as follows:
Grails"", "Sans-serif" '> built on these concepts, and significantly reduced the complexity of Building Web applications on the Java platform. The difference is that these are built on established Java technologies such as spring and hibernate.
Currently, scala and groovy are both developing rapidly. Currently, groovy has the advantages of usability and seamless connection with Java. Scala has the advantages of performance and some advanced features, if the two can learn from each other's advantages in the development process to enrich themselves, it is undoubtedly a good news for developers. As mentioned by the author of the first post:
We don't want to see a desperate struggle, but we want to see that the groovy team with more pragmatic ideas can work with Scala teams with more academic ideas, create a powerful and easy-to-use language.
Who will you bet on?