This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)
|
| Odin | |
|---|---|
| Paradigm | Imperative, data-oriented, procedural |
| Designed by | Bill Hall |
| Developer | The Odin Community |
| First appeared | July 2016 |
| Stable release | dev-2026-02
/ February 4, 2026 |
| Typing discipline | Static, strong, inferred |
| OS | Windows, macOS, Linux, FreeBSD |
| License | zlib License |
| Filename extensions | .odin |
| Website | odin-lang |
| Major implementations | |
| Odin Compiler (LLVM-based) | |
| Influenced by | |
| Pascal, C, Go, Oberon-2, Newsqueak, GLSL[1] | |
Odin is a general-purpose, statically typed, compiled systems programming language designed by Bill Hall. It was created to serve as an alternative to C using data-oriented programming and a modern type system.
The language avoids object-oriented concepts such as classes and inheritance. Instead it offers features such as structs, data composition, and a custom context system.[2] It is a general purpose language with systems-level performance, so it can be used in game development and computer graphics. It is used as the primary language for the software developed by JangaFX.[3]
History
Development of Odin began in July, 2016, by Bill Hall (often referred to online as "Ginger Bill").[1] Hall began the project due to frustration with C++ and a desire for a language that offered the low-level capabilities of C with modern quality-of-life improvements, strict type safety, and better memory control.
The language has been developed as an open-source project, hosted on GitHub, with contributions from the community. It is currently in active development, with frequent releases aimed at stabilising a specification before reaching version 1.0.
Design and philosophy
Odin is designed with a focus on simplicity,[4] high performance, and modern systems programming needs. While it shares the goal of being a system-level language like C, it features distinct syntax and behavior compared to C, adopting a Pascal-style declaration syntax and strict type separation.[5] To support high-performance graphics and game development, the language includes a rich built-in set of types for mathematics, including vectors, matrices, and quaternions, as well as native support for endian-specific types.[5]
Data-oriented programming
A core pillar of Odin's philosophy is data-oriented programming, also known as data-oriented design (DOD). The language provides native features to manipulate memory layouts efficiently, catering to modern CPU cache architectures. This includes built-in support for struct of arrays (SoA) data structures. While many languages require manual implementation of SoA layouts, Odin provides specific syntax, such as `#soa` slices and arrays, to automatically transform data structures. This allows developers to switch between Array of Structures (AoS) and SoA without significant refactoring of the codebase.[6]
Memory management
Odin relies on manual memory management rather than garbage collection. To manage resources safely, the language utilizes a `defer` statement to ensure cleanup code runs at the end of a scope.
Implicit context
A distinctive feature of Odin is the "implicit context system." According to language creator Bill Hall, "in each scope, there is an implicit value named `context`" which "is local to each scope and is implicitly passed by pointer to any procedure call in that scope."[7] Hall states that "the main purpose of the implicit context system is for the ability to intercept third-party code and libraries and modify their functionality," such as "modifying how a library allocates something or logs something."[7] The language documentation notes that this allows the system to define "the allocator, the logger, and the error handler" for a specific scope without explicitly passing them as parameters.[2]
Type system and features
The language uses a strict, statically typed system. It supports "ad hoc parametric polymorphism" (generics), allowing for reusable code structures without the complexity of traditional C++ templates or object-oriented inheritance.[5]
Odin supports multiple return values from procedures. This feature facilitates the language's primary method of error handling: rather than using exceptions, Odin relies on error handling through multiple returns, where a procedure returns a value alongside an error code or a boolean success flag.[5] The type system also enforces "distinct types," meaning a named type defined from an existing type (e.g., `distinct int`) cannot be used interchangeably with the original type without an explicit cast, preventing logic errors.[2]
Syntax
Odin's syntax uses curly braces for scoping but adopts a procedural declaration style.
Hello World
package main
import "core:fmt"
main :: proc() {
fmt.println("Hello, World!")
}
Pointers
Odin uses `^` for pointer types and a postfix `^` for dereferencing:
p: ^int
p^ = 10
Ecosystem and usage
Odin includes a "core" library for standard functionality (IO, math, networking) and a "vendor" library. The vendor library integrates popular third-party C libraries, such as OpenGL, Vulkan, SDL, and Raylib, directly into the distribution to facilitate immediate development for graphics and games.
Notable software
The most prominent commercial usage of Odin is by the software company JangaFX, which uses Odin for its real-time simulation tools used in film and game production, such as EmberGen (volumetric fluids like fire and smoke), LiquiGen (liquids), and GeoGen (terrain). [3]
References
- ^ a b "Odin FAQ: History". Odin-lang.org. Retrieved 17 January 2026.
- ^ a b c "Odin Programming Language documentation". Odin-lang.org. The Odin Programming Language. Retrieved 17 January 2026.
- ^ a b "VDB Deep Dive". JangaFX.com. Retrieved 17 January 2026.
It is written in the Odin programming language, which we use at JangaFX for developing our products.
- ^ "Introduction to Odin". LearnOdin.org. Retrieved 17 January 2026.
- ^ a b c d "Compare Languages: Odin". c3-lang.org. C3 Language Project. Retrieved 17 January 2026.
- ^ Zylinski, Karl. "Structure of Arrays in Odin". Odinbook.com. Retrieved 17 January 2026.
- ^ a b Hall, Bill (15 December 2025). "context—Odin's Most Misunderstood Feature". gingerbill.org. Retrieved 17 January 2026.
