openskills.info
Scala Fundamentals logoCourse Preview

Scala Fundamentals

Scala is a statically typed language that combines object-oriented and functional programming on the JVM, with JavaScript and native targets. Its immutable values, pattern matching, and concise syntax help you build expressive, reliable application code.

itProgramming languages

Scala Fundamentals

Scala is a statically typed language that fuses object-oriented and functional programming. Martin Odersky designed it at EPFL. Scala code runs on the JVM and can also target JavaScript and native platforms. The language is not a framework: a useful program also needs a target platform, a build setup, and often libraries.

Scala's mental model is types plus expressions. A type describes the values an expression can hold. val declares an immutable reference. var declares a mutable one. Reach for immutable values first; keep mutation visible and local when you need it.

val greeting = "Hello"
val message = s"$greeting, Mina"

A unified type hierarchy

Every value has a type. The type hierarchy puts Any at the top. AnyVal covers value types such as Int, Double, and Boolean. AnyRef covers reference types such as classes. At the bottom sits Nothing, the type of expressions that never produce a value. You will meet Any, AnyVal, and AnyRef in signatures and error messages, so recognizing them pays off.

val count: Int = 42
val label: String = "bytes"

Scala often infers a type from an expression. The inferred type still shapes what the code can do.

Continue the course

This section is part of the paid course.

See pricing to subscribe, or log in if you already have access.

Where this skill leads

Relevant careers

See how this topic contributes to broader role-level skill maps.

Sources

  • https://docs.scala-lang.org/tour/tour-of-scala.html
  • https://docs.scala-lang.org/tour/basics.html
  • https://docs.scala-lang.org/tour/unified-types.html
  • https://docs.scala-lang.org/tour/higher-order-functions.html
  • https://docs.scala-lang.org/tour/pattern-matching.html
  • https://docs.scala-lang.org/tour/for-comprehensions.html
  • https://docs.scala-lang.org/scala3/reference/contextual/givens.html
  • https://docs.scala-lang.org/scala3/reference/contextual/extension-methods.html
  • https://en.wikipedia.org/wiki/Scala_(programming_language)
  • https://github.com/lauris/awesome-scala
  • https://www.scala-lang.org/
  • https://www.scala-sbt.org/
  • https://scala-cli.virtuslab.org/
  • https://www.scala-js.org/
  • https://scala-native.readthedocs.io/
  • https://scalameta.org/metals/
  • https://www.jetbrains.com/idea/
  • https://scalameta.org/scalafmt/
  • https://github.com/scalacenter/scalafix
  • https://scastie.scala-lang.org/
  • https://index.scala-lang.org/
  • https://akka.io/
  • https://spark.apache.org/