Scala is multi-paradigm programming language. It was designed so it would integrate features of object-oriented and functional programming. The name origins from English word „scalable“, therefore Scala was developed to grow with the demands from users.

History

The author of Scala is Martin Odersky from École Polytechnique Fédérale de Lausanne in Switzerland. He also worked on Java before, participated in the authorship of java compiler and extension of superset Generic Java. The development of Scala began in 2001. The first version of Scala was intended for the Java platform and was released in 2003/2004, after another half a year was published in June 2004 version for .NET platform.

The syntax specifics

Scala was designed with the aim to be backward compatible with Java. But it is not a case of Java extension. Scala is purely independent new programming language, which does not try to strictly stick to any great model as is Java, Lisp or Smalltalk. Regardless, experienced programmer will find elements in syntax that he knows from different programming languages. From another point of view, Scala submits new language constructions, which are not contained in its predecessors.

Integration with Java

During Java’s existence were implemented extensive amounts of classes, which solve different types of tasks. The Scala’s advantage is that there exists option to use these classes directly without the need of translation to the Scala or any other changes. All default classes from java.lang package are automatically imported. Classes, which belong to other packages is important to import explicitly.

Object-oriented features of language

Scala is purely object-oriented programming language. It means that in comparison to Java it does not contain primitive data types. Everything is created like an object and including the numbers. Every arithmetic operation is actually calling the appropriate method.

Functional features of language

Scala syntax has a support for currying, anonymous functions and higher-order functions. It also allows writing nested functions and contains a lot of other constructions, which are typical for functional programming languages. Scala combines the options of functional and object-oriented programming.

Advantages of using Scala

  • Simple syntax. Scala usually requires less than two thirds of code than e. g. Java. Syntax is also more flexible. E. g. it is possible to let dots among the individual method calling, so the code would be readable and more understandable for a person.
  • Inherent unchangeable objects. Scala reduces many security risks, which are bound to the traditional Java.
  • Highly functionalistic. Scala is based on functions.
  • High speed of implementation. Allows faster implementation and increased efficiency.
  • Simplicity of solving problems with concurrency. Actor library can solve problems with concurrency very fast.
  • XML support. Scala supports XML, which comes in handy in case of documents coding.

Disadvantages of using Scala

  • Smaller community. According to the fact that is has smaller tradition than e. g. Grails or Rails, it has smaller community of users and sources, which would help with solving problems.
  • Hard to learn. Scala is in terms of syntax very different from Java and represents entirely different programming paradigms, which require high level of knowledge.
  • Team work. Team work in Scala can turn into hybrid between Java and Scala, which can cause problems.
  • Limited backward compatibility. Each larger release of Scala can be noncompatible with the version before, which leads to the need to discover a lot of things again.