There are following features in Scala:
- Type inference: In Scala, you don't require to mention data type and function return type explicitly.
- Singleton object: Scala uses a singleton object, which is essentially class with only one object in the source file.
- Immutability: Scala uses immutability concept. Immutable data helps to manage concurrency control which requires managing data.
- Lazy computation: In Scala, computation is lazy by default. You can declare a lazy variable by using the lazy keyword. It is used to increase performance.
- Case classes and Pattern matching: In Scala, case classes support pattern matching. So, you can write more logical code.
- Concurrency control: Scala provides a standard library which includes the actor model. You can write concurrency code by using the actor.
- String interpolation: In Scala, string interpolation allows users to embed variable references directly in processed string literals.
- Higher order function: In Scala, higher order function allows you to create function composition, lambda function or anonymous function, etc.
- Traits: A trait is like an interface with partial implementation. In Scala, the trait is a collection of abstract and non-abstract methods.
- Rich set of collection: Scala provides a rich set of collection library. It contains classes and traits to collect data. These collections can be mutable or immutable.