Scala 3 (original) (raw)

Scala 3

3.7.0

LearnInstallPlaygroundFind A LibraryCommunityBlog

Scala 3

LearnInstallPlaygroundFind A LibraryCommunityBlog

DocsAPI

Reference

New Types

Intersection Types

Union Types

Type Lambdas

Match Types

Dependent Function Types

Polymorphic Function Types

Enums

Enumerations

Algebraic Data Types

Translation of Enums and ADTs

Contextual Abstractions

Given Instances

Using Clauses

Context Bounds

Deferred Givens

Importing Givens

Other Forms Of Givens

Extension Methods

Right-Associative Extension Methods: Details

Implementing Type classes

Type Class Derivation

How to write a type class `derived` method using macros

Multiversal Equality

Context Functions

Implicit Conversions

By-Name Context Parameters

Relationship with Scala 2 Implicits

Metaprogramming

Inline

Compile-time operations

Macros

The Meta-theory of Symmetric Metaprogramming

Run-Time Multi-Stage Programming

Reflection

TASTy Inspection

Other New Features

Trait Parameters

Transparent Traits and Classes

Universal Apply Methods

Export Clauses

Opaque Type Aliases

Opaque Type Aliases: More Details

Named Tuples

Open Classes

Parameter Untupling

Kind Polymorphism

The Matchable Trait

The @threadUnsafe annotation

The @targetName annotation

New Control Syntax

Optional Braces

Safe Initialization

TypeTest

Experimental Definitions

Preview Definitions

Binary Integer Literals

Other Changed Features

Numeric Literals

Programmatic Structural Types

Rules for Operators

Wildcard Arguments in Types

Imports

Changes in Type Inference

Changes in Implicit Resolution

Implicit Conversions

Changes in Overload Resolution

Match Expressions

Vararg Splices

Pattern Bindings

Option-less pattern matching

Automatic Eta Expansion

Changes in Compiler Plugins

Lazy Vals Initialization

Main Methods

Escapes in interpolations

Dropped Features

Dropped: DelayedInit

Dropped: Scala 2 Macros

Dropped: Existential Types

Dropped: General Type Projection

Dropped: Do-While

Dropped: Procedure Syntax

Dropped: Early Initializers

Dropped: Class Shadowing

Dropped: Limit 22

Dropped: XML Literals

Dropped: Symbol Literals

Dropped: Auto-Application

Dropped: Weak Conformance

Deprecated: Nonlocal Returns

Dropped: private[this] and protected[this]

Dropped: Wildcard Initializer

Preview

Better fors

Experimental

CanThrow Capabilities

Erased Definitions

Named Type Arguments

Numeric Literals

Explicit Nulls

MainAnnotation

The `into` Type Modifier

Capture Checking

Pure Function Syntax

Tupled Function

Modularity Improvements

Better Support for Type Classes

The runtimeChecked method

Automatic Parameter Unrolling

Reference-able Package Objects

Scala 3 Syntax Summary

Language Versions

Source Compatibility

Binary Compatibility

Soft Keywords

A Classification of Proposed Language Features

Generated with

Copyright (c) 2002-2025, LAMP/EPFL

Copyright (c) 2002-2025, LAMP/EPFL

Scala 3

This website contains the developer documentation of the Scala 3 compiler. It targets developers interested in contributing to the compiler, or learning its internals. If you want to learn how to use Scala, go here.

Table of Contents

Next Reference

Contributors to this page

Edit this page on GitHub

Generated with

Copyright (c) 2002-2025, LAMP/EPFL

Copyright (c) 2002-2025, LAMP/EPFL