Scala (Generalities)¶
Main Features of Scala¶
- All types are objects
- Type inference
- Nested Functions
- Functions are objects
- Domain specific language (DSL) support
- Traits
- Closures
- Concurrency support inspired by Erlang
Tools and Frameworks¶
REPL https://ammonite.io/
Install¶
- Need to have Java Software Development Kit (SDK) installed
https://www.scala-lang.org/download/
Compilation¶
Scala 3 Updates¶
- Indentation-based syntax: Similar to Python.
- Enums: First-class support for algebraic data types.
- Extension Methods: Easier way to add methods to existing types.
- Given Instances and Using Clauses: Replacement for
implicits.