Odin 2016
Joy in systems programming: explicit, data-oriented, and gloriously garbage-collector-free.
Influenced by: C pascal go oberon-2 newsqueak glsl
Odin is a data-oriented systems language built by Ginger Bill for high-performance work and game development, aiming for the joy and simplicity of programming with the explicitness of C. Memory is manual and garbage-collector-free: there is no RAII and no hidden destructors, but an implicit per-scope context carries an allocator so new, make, free, and delete route through whichever allocator is in scope. Custom allocators (arenas, pools, stacks) plus defer make freeing memory in bulk both cheap and predictable.
What makes it distinctive
- Manual, garbage-collector-free memory management with no RAII and no hidden destructors - you allocate and free explicitly, but
deferschedules cleanup (e.g.defer free(p)) to run in reverse order at end of scope. - An implicit
contextvalue passed as a hidden argument to every Odin-convention procedure; it carries acontext.allocator(and a temporary allocator, logger, etc.), sonew,make,free, anddeleteuse the in-scope allocator without threading it through every call. - First-class custom allocators - arenas, pools, and stack allocators are part of
core:mem; swapcontext.allocatorfor an arena and free a whole subsystem's memory in a single reset instead of tracking individual frees. - No exceptions. Errors are ordinary values returned via multiple return values, with the
or_returnoperator to propagate them andor_elseto supply defaults - error handling is plain control flow. - Data-oriented by design: built-in dynamic arrays, slices, and maps, plus the
#soadirective that transparently lays structures out as a Structure-of-Arrays for cache-friendly access, withsoa_zip/soa_unzip. - Distinct typing:
My_Int :: distinct intcreates a genuinely new, incompatible type sharing the underlying representation, catching unit/identifier mix-ups the C type system would let slide.
History
Odin began one evening in late July 2016, when Bill Hall - known online as Ginger Bill - grew frustrated with C++ while working in scientific computing and graphics. A physicist by training (a master's in quantum mechanics and the start of a PhD in condensed matter physics), he started the project as essentially a Pascal clone, complete with begin/end blocks, before quickly steering it toward a C-like surface syntax of its own.
The language was a private project for nearly three years. It went open source on GitHub and was introduced publicly (notably on Reddit) around June 2019, released under the permissive zlib license. By its own documentation Odin "borrows heavily from (in order of philosophy and impact): Pascal, C, Go, Oberon-2, Newsqueak, GLSL," with explicit design inspiration from Niklaus Wirth and Rob Pike - a lineage that shows in its emphasis on explicitness and simplicity over cleverness.
Odin grew up inside the handmade and game-development communities, where its data-oriented features - built-in dynamic arrays, slices and maps, SOA (#soa) layouts, and first-class custom allocators - found a natural audience. It has been used in shipping software and game tooling and ships bindings to libraries such as Vulkan, OpenGL, and Raylib. Rather than cut numbered 1.0 releases, the project uses a rolling dev-YYYY-MM versioning scheme (for example dev-2024-01), with monthly snapshots; the compiler remains under active development and has not declared a traditional stable 1.0.