Scala - An Overview and Best Practices

 · 1 min read

Scala

What is Scala

Scala stands for scalable language and is inteded to solve the problems of Java while simultaneously being more concise. Initally designed by Martin Odersky, it was released in 2003. Scala is a statistcally typed programming language that incorporates both functional programming and object-oriented programming to increase scalability of applications. Scala is a compiler based programming language and generates byte code which can be executed on Java Virtual Machine (JVM). As a result, it interoperates nicely with existing Java code and libraries. Scala is a lazy evaluated language. Moreover Spark is developed using Scala.

The main features of Scala

  1. Functional programming
  2. Immutability
  3. Composing functions
  4. High Order functions
  5. Pattern Matching
  6. Asynchronous and parallel programming
  7. Dependency Injection
  8. Extensible language
  9. Scala ecosystem
  10. Mixing Java code with Scala

What is the difference between a var, a val and def?

A var is a variable