Software Engineering KB

Home

❯

02 Programming Languages and Paradigms

❯

01 Type Systems

❯

01 Concept

❯

Phantom Types

Phantom Types

Feb 10, 20261 min read

  • type-systems
  • phantom-types

Phantom Types

← Back to Advanced Type Features

Type parameters that appear in the type signature but are not used in the data representation. Phantom types encode additional compile-time information (such as units, state, or permissions) without any runtime cost, preventing invalid operations through the type system.

Key Properties

  • Unused Type Parameters for Compile-time Safety

type-systems phantom-types


Graph View

  • Phantom Types
  • Key Properties

Backlinks

  • Advanced Type Features
  • Unused Type Parameters for Compile-time Safety

Created with Quartz v4.5.2 © 2026

  • GitHub