~/langs $ odin build . -o:speed // 0 errors, 0 warnings

SODIN

the data-oriented brawler · a language for the joy of programming

2016 born 0 exceptions 0 package managers 1 weekend to learn

[01] ORIGIN

One programmer got tired of fighting C++ and built the language he actually wanted to write. It shows.

Ginger Bill started Odin in 2016 after one debugging session too many in the trenches of modern C++. The design brief was simple and ruthless: keep the directness of C, fix its actual mistakes (the preprocessor, the declarations, the undefined-behavior minefield), and refuse every feature whose main job is making code clever instead of clear. The result reads like C written by someone with thirty years of hindsight, because that's what it is. It is the language fastr and Sakura are built in, and the reason both of those felt like play instead of work.

creatorGinger Bill (gingerBill), 2016
paradigmprocedural, data-oriented, explicit
memorymanual, via context allocators
depscore: and vendor: ship with the compiler; everything else you vendor
famous userJangaFX (EmberGen): production VFX tools, all Odin
my usefastr (relay), Sakura (Blossom server)

[02] WHAT IT GETS RIGHT

ult the context system

Every procedure implicitly carries a context with an allocator, a temp allocator and a logger. Swap the allocator at any call boundary and everything below it allocates your way: an arena per request, a scratch buffer per frame. Sakura resets one arena per request and simply never calls free. Memory management stops being bookkeeping and becomes architecture.

passive zero is initialized

Every value starts as useful zero, by design rather than by accident. Combined with distinct types and explicit casts, an entire genre of "forgot to set it" bugs never spawns in the first place.

stance no hidden anything

No exceptions, no constructors, no destructors, no operator overloading, no function overloading by surprise. Control flow on the page is control flow in the binary. You can read a procedure top to bottom and know exactly what runs, which is most of what "readable" should ever mean.

combo built for data

Structs lay out the way you wrote them. #soa turns an array of structs into a struct of arrays when the loop wants it. bit_set, fixed arrays, slices, matrices and quaternions in the core language. Odin assumes you care where your bytes live, because you should.

buff errors as values, pleasantly

Multiple return values plus or_return give you Result-style error handling without the ceremony: the failure path is visible, checked and one token long.

aura batteries vendored

core: covers hashing, JSON, threads, networking essentials; vendor: ships raylib, SDL, stb and friends with the compiler. And no package manager, which is a feature: dependencies are folders you read and own.

[03] THE CODE

package demo

import "core:fmt"

Vec3 :: struct { x, y, z: f32 }

main :: proc() {
    // everything below this line allocates into the temp arena,
    // and one line frees all of it on every exit path
    defer free_all(context.temp_allocator)

    points := make([dynamic]Vec3, context.temp_allocator)
    append(&points, Vec3{1, 2, 3})
    append(&points, Vec3{})            // zero value: valid, useful

    for p, i in points {
        fmt.println(i, p)              // no operator<< mysteries
    }
}

Note what is absent: no lifetimes, no header file, no try/catch, no build config. defer plus the context allocator does the work a garbage collector or a borrow checker would do, except you can see it and it costs nothing.

[04] THE BAD

// status effects

  • EARLY ACCESSpre-1.0, and the spec still moves under you. Pin your compiler version and read the release notes; the language is stable in spirit, not yet in writing.
  • HR SPEAKS JAVAnobody hires for it yet. You write Odin because you want to, not because a recruiter found you. (This is also a filter, and the community quality shows it.)
  • YOU ARE THE SAFETYmemory safety is your job; Odin hands you the gun loaded, grip first. I consider that respect. You might consider it a hole in your foot. The temp allocator and ZII remove most of the classic wounds, but not all of them.

[05] VERDICT

S tier. The language that made programming fun again, and the one this site keeps receipts for.

Use it for anything you own end to end: servers, tools, games, the entire category of "small sharp programs that respect the machine". fastr outruns the industry-standard relay 62 to 1 in Odin; Sakura fits a whole Blossom server in a 1.2 MB binary. When other people will run your code unsupervised and the code holds keys, reach for Rust. For everything else, there's the brawler.

// the rune on this page means "inheritance". fitting: it's C's, spent well.