# Scala

> A language that mixes two styles and runs where Java runs.

**Field:** Software Development  
**Category:** Languages  
**Also known as:** Scala Language, Scala 3

## Think of it like

It is like a toolbox with old tools and new tools side by side.

## Definition

Scala is a language that mixes object-oriented and functional programming. Its types are checked before the program runs. It mostly runs on the Java Virtual Machine, so it can use any Java library. It can also run in the browser as JavaScript. Big data tools such as Apache Spark are written in it.

## Example

A data team writes its Spark jobs in Scala. They double every number in a list with one short line.

## Example code

```scala
val nums = List(1, 2, 3)
println(nums.map(_ * 2))   // List(2, 4, 6)
```

Double each number in a list with map.

## Why it matters

It brings functional ideas to the huge world of Java code. Much data engineering runs on it.

## Common mistake

Using every feature at once. Scala allows many styles, and a team needs to agree on one.

## Three principles

- **Two styles.** Objects and functions together.
- **Runs on the JVM.** Uses Java libraries.
- **Static types.** Checked before it runs.

## Related terms

- [Java](https://learn.benibix.com/term/development/java)
- [Functional Programming](https://learn.benibix.com/term/development/functional-programming)
- [Object-Oriented Programming (OOP)](https://learn.benibix.com/term/development/object-oriented-programming)
- [Haskell](https://learn.benibix.com/term/development/haskell)
- [Apache Spark](https://learn.benibix.com/term/data/apache-spark)

## Taught in

- [Haskell, Scala and Elixir](https://learn.benibix.com/learn/development-languages/haskell-scala-and-elixir): Programming Languages, 11/12

![Four labelled shelves of languages. Data science: R, MATLAB and Julia, beside a small bar chart. Functional: Haskell, Scala, Elixir, beside an arrow that turns a list into a new list. Shell and scripting: shell script, PowerShell, Perl and Lua, beside a terminal prompt. Close to the hardware: assembly language and Objective-C, beside a chip and a phone.](https://learn.benibix.com/diagrams/dev4-language-families.svg)

---

Source: https://learn.benibix.com/term/development/scala
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
