Scala (programming language)

Scala
ParadigmMulti-paradigm: concurrent, functional, imperative, object-oriented
FamilyJVM-hosted
Designed byMartin Odersky
DeveloperÉcole Polytechnique Fédérale de Lausanne: Programming Methods Laboratory
First appeared20 January 2004 (2004-01-20)
Stable release
3.9.0 Edit this on Wikidata / 3 September 2026 (3 September 2026)
Typing disciplineInferred, static, strong, structural
Implementation languageScala
PlatformJava virtual machine (JVM)
JavaScript (Scala.js)
LLVM (Scala Native) (experimental)
LicenseApache 2.0
Filename extensions.scala, .sc
Websitewww.scala-lang.org
Influenced by
Common Lisp, Eiffel, Erlang, Haskell, Java, OCaml, Oz, Pizza, Scheme, Smalltalk, Standard ML
Influenced
Ceylon, Chisel, Fantom, F#, C#, Kotlin, Lasso, Red, Flix
  • Wikibooks logo Scala at Wikibooks

Scala (/ˈskɑːlɑː/ SKAH-lah) is a strongly statically typed high-level general-purpose programming language that supports both object-oriented programming and functional programming. Designed to be concise, many of Scala's design decisions are intended to address criticism of Java.

Scala source code can be compiled to JVM bytecode and run on a Java virtual machine (JVM). Scala can also be transpiled to JavaScript to run in a browser, or compiled directly to a native executable using Clang. When running on the JVM, Scala provides language interoperability with Java so that libraries written in either language may be referenced directly in Scala or Java code. Like Java, Scala is object-oriented, and uses a syntax termed curly-brace which is similar to the language C. Scala 3 added an option to use the off-side rule (indenting) to structure blocks, and its use is advised. Martin Odersky has said that this turned out to be the most productive change introduced in Scala 3.

Unlike Java, Scala has many features of functional programming languages (like Scheme, Standard ML, and Haskell), including currying, immutability, lazy evaluation, and pattern matching. It also has an advanced type system supporting algebraic data types, covariance and contravariance, higher-order types (but not higher-rank types), anonymous types, operator overloading, optional parameters, named parameters, raw strings, and an experimental exception-only version of algebraic effects that can be seen as a more powerful version of Java's checked exceptions.

The name Scala is a portmanteau of scalable and language, signifying that it is designed to grow with the demands of its users.