What's so great about Scala? [closed]

2019-01-20 21:54发布

What makes Scala such a wonderful language, other than the type system? Almost everything I read about the language brings out 'strong typing' as a big reason to use Scala, but there has to be more than that. What are some of the other compelling and/or cool language features that make Scala a really useful tool?

14条回答
霸刀☆藐视天下
2楼-- · 2019-01-20 22:03

It's a mash up of the best bits from a bunch of languages, what's not to love:

  • Ruby's terse syntax
  • Java's performance
  • Erlang's Actor Support
  • Closures/Blocks
  • Convenient shorthand for maps & arrays
查看更多
劫难
3楼-- · 2019-01-20 22:03

Every day you code Java you will become more and more miserable, every day you code Scala you will become happier.

查看更多
仙女界的扛把子
4楼-- · 2019-01-20 22:06

I want to add the multi-paradigm (OO and FP) nature gives Scala an edge over other languages

查看更多
贪生不怕死
5楼-- · 2019-01-20 22:07

The great features of Scala has already been mentioned. One thing that shines through past all features though, is how tastefully everything is integrated.

Scala manages to be one of the most powerful language around without having a feeling of having bolted on features in haste. Neither are the language an academic exercise in proving a point. Innovation and really advanced concepts are brought in to the language with uncanny practicality and elegance.

In short: Martin Odersky is a pure design genius. That is what's so great about Scala!

查看更多
别忘想泡老子
6楼-- · 2019-01-20 22:08

If we abandon feature discussion and will talk about style, i would say it's pipe-line style of coding. You start from some object or collection, types dot and property or dot and transformation and do it until you form desired result. This way it's easy to write a chain of transoformations that will be easy to read them also. Traits to some extend will also allow you to apply the same approach to constructing types.

查看更多
登录 后发表回答