Est. 2016 Intermediate

Odin

A systems programming language designed as a C alternative with data-oriented design, explicit control, and joy of programming.

Created by Bill Hall (Ginger Bill)

Paradigm Imperative, Procedural, Data-Oriented
Typing Static, Strong (with distinct types)
First Appeared 2016
Latest Version dev-2026-02 (February 2026)

Odin is a general-purpose systems programming language designed as a modern alternative to C. Created by Bill Hall (known online as Ginger Bill), Odin emphasizes data-oriented design, explicit control over memory and procedure calls, and aims to bring “the joy of programming” to systems-level development. The official tagline describes it as “The C alternative for the Joy of Programming.”

History & Origins

Odin was born one evening in late July 2016, when Ginger Bill – a physicist with a background in condensed matter physics, quantum optics, and high precision metrology – grew frustrated with programming in C++. The initial prototype started as a Pascal clone with begin and end keywords, but quickly evolved into its own distinct language.

The first commit to the GitHub repository was made on November 23, 2016. Unlike many language projects that aim for a formal 1.0 release, Odin follows a monthly development release cycle with versions named dev-YYYY-MM. While the compiler has not declared a “1.0” milestone, the language is actively used in commercial production software.

Ginger Bill works at JangaFX, where all of the company’s products – including the EmberGen real-time fluid simulator – are written entirely in Odin. This provides strong real-world validation of the language’s capabilities.

Design Inspirations

The official FAQ states that Odin “borrows heavily from (in order of philosophy and impact): Pascal, C, Go, Oberon-2, Newsqueak, and GLSL.” The FAQ also notes that “Niklaus Wirth and Rob Pike have been the programming language design idols throughout this project.”

Language Design Philosophy

Odin takes a pragmatic approach to systems programming, with several core design principles:

  • Data-oriented design - First-class support for Structure of Arrays (SOA) via the #soa directive
  • Explicit over implicit - No implicit type conversions, no hidden control flow
  • No exceptions - Error handling through multiple return values
  • No classes or inheritance - Procedural style with structs and procedures
  • No constructors or destructors - Explicit initialization and cleanup with defer
  • Manual memory management - Custom allocators with an implicit context system
  • No pointer arithmetic - Safety feature; helper procedures like ptr_offset are used instead

Key Features

Distinct Type System

Odin’s distinct type system is a defining feature. It allows creating new types that share the same underlying representation but are type-incompatible at compile time:

1
2
3
4
5
6
7
Meters :: distinct f64
Seconds :: distinct f64

// The compiler prevents accidentally mixing these types
distance: Meters = 100
time: Seconds = 9.58
// speed := distance / time  // Compile error! Can't divide Meters by Seconds

This prevents entire categories of unit-mismatch bugs at compile time.

Implicit Context System

Odin uses an implicit context parameter passed through the call chain, carrying allocators and other configuration without explicit threading:

1
2
3
4
5
6
7
// The context carries the current allocator, logger, etc.
// Every procedure receives it implicitly
main :: proc() {
    // Change the allocator for a scope
    context.allocator = my_custom_allocator
    do_work()  // This and all functions it calls use my_custom_allocator
}

Built-in Array Programming

Odin has native support for array operations and GLSL-style swizzling:

1
2
3
v := [3]f32{1.0, 2.0, 3.0}
w := v.xzy          // Swizzle: reorder components
result := v + w     // Element-wise addition

Built-in Matrix Type

Odin includes a native matrix type with SIMD-optimized operations:

1
2
3
4
5
6
m := matrix[4, 4]f32{
    1, 0, 0, 0,
    0, 1, 0, 0,
    0, 0, 1, 0,
    0, 0, 0, 1,
}

Platform Support

Odin supports compiling on and targeting multiple platforms:

Host OSArchitectures
Windowsx86-64 (requires MSVC)
Linuxx86-64, ARM64
macOSx86-64, ARM64
FreeBSDx86-64, ARM64
NetBSDx86-64, ARM64
OpenBSDx86-64

Odin can also compile to WebAssembly (wasm32/wasm64p32) targets. The compiler requires LLVM and Clang on Linux/BSD, MSVC on Windows, and both Xcode command-line tools and LLVM (via Homebrew) on macOS.

Odin vs. C

FeatureOdinC
Type systemDistinct types, tagged unionsTypedef aliases, untagged unions
Memory managementCustom allocators via contextManual malloc/free
Error handlingMultiple return valuesError codes or errno
GenericsBuilt-in parametric polymorphismMacros or void pointers
Array boundsBounds-checked by defaultNo bounds checking
String typeBuilt-in string typeNull-terminated char arrays
Pointer arithmeticNot allowedAllowed
Build systemBuilt into compilerExternal (Make, CMake, etc.)

Comprehensive Vendor Library

Odin ships with official bindings for many popular libraries:

  • Graphics: OpenGL, Vulkan, Metal, Direct3D 11/12
  • Windowing: SDL2, SDL3, GLFW
  • Game development: raylib
  • Audio: miniaudio
  • Networking: Built-in socket support

This makes Odin particularly well-suited for game development and graphics programming without needing to write C bindings manually.

The Odin Community

  • odin-lang.org - Official website with documentation and language overview
  • GitHub - Active development at github.com/odin-lang/Odin
  • Discord - Primary community communication channel
  • Showcase - Official showcase page featuring projects built with Odin

Timeline

2016
Bill Hall (Ginger Bill) starts developing Odin, frustrated with programming in C++
2016
First commit to the GitHub repository on November 23
2019
JangaFX reportedly begins using Odin for commercial products including EmberGen
2024
Language matures with monthly dev releases; over 9,800 GitHub stars
2026
dev-2026-02 released; active development continues with 500+ contributors

Notable Uses & Legacy

EmberGen

Real-time volumetric fluid simulator written entirely in Odin, used by studios including Bethesda, CAPCOM, and Weta Digital according to the official Odin showcase.

GeoGen / LiquiGen

Terrain and liquid simulation tools from JangaFX, also built with Odin.

Ols

Community-maintained Language Server Protocol implementation for Odin, featured on odin-lang.org, enabling IDE support.

Spall

A high-performance profiler tool with both web and native desktop versions.

Language Influence

Influenced By

Pascal C Go Oberon-2 Newsqueak GLSL

Running Today

Run examples using the official Docker image:

docker pull primeimages/odin:latest

Example usage:

docker run --rm -v $(pwd):/app -w /app primeimages/odin:latest sh -c 'cp hello.odin /tmp/hello.odin && cd /tmp && odin run .'

Topics Covered

Last updated: