Skip to content

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/

https://scalafiddle.io/

https://typelevel.org/

Install

  • Need to have Java Software Development Kit (SDK) installed
java -version
export JAVA_HOME=/usr/local/java-current
export PATH=$PATH:$JAVA_HOME/bin/

https://www.scala-lang.org/download/

Compilation

scalac HelloWorld.scala  // produces HelloWorld.class
scala -classpath . HelloWorld