Scala Scalability – Why Is Scala More Scalable Than Other Languages?

scalascalability

Scala is billed as a scalable language, a feature that's even included in its name:

The name Scala is a portmanteau of "scalable" and "language", signifying that it is designed to grow with the demands of its users.

What does "scalable" mean in the context of Scala? What makes Scala more scalable than, say, Java?

Best Answer

When Martin Odersky talks about scala as a scalable language choice, what he means is that the language itself is appropriate for:

  • scripting stuff
  • writing applications
  • writing monster "enterprise" (for the want of a better word) applications

He is most certainly not referring to scalability from the perspective of performance!

The fact that he can claim that scala is as appropriate for quick'n'dirty scripting as it is for large-scale enterprise deployment is roughly as follows:

Scripting

Scala is great for scripting because its type inference and functional style make it both concise and great for slicing and dicing collections etc.

Applications

Scala is great for writing applications because it is a statically type checked language with some great features for working in both functional and imperative styles. Scala is compatible with Java and hence you can leverage an enormous ecosystem of libraries.

Enterprise Deployment

Scala compiles to bytecode and runs on the Java Virtual Machine, a stable system with great performance, when compared to (so-called) dynamically typed (i.e. untyped) languages. Again, the fact that it is statically typed means that refactoring is made much easier on large codebases.