Hacker News

Favorites Setup
Comment by boltzmann64 | original | A NES emulator written in Odin
[−]boltzmann64 · 2026-11-15 Sun 15:24 UTC · link
i love odin.

- manual memory management

- arena and pool allocators

- go style err!=nill style exception handling

- first class support for soa and vectorized simd, linear algebra and swizzling

- sanely typed and namespaces

- explicit unambigious overloading, subroutine context

- first class support for defer statements

- zero friction C ffi

if you haven't heard of odin, you should definitely consider it.

[−]christophilus · 2026-11-15 Sun 15:36 UTC · link
LLMs are pretty good at it, too. I recently had Haiku rewrite all of my Quickshell Linux UIs (dux) to Odin + an immediate mode GUI library: launcher, Niri bar, WiFi manager, process manager, lock screen, HUD audio/brightness, etc. Did all but the process manager in a day, while I was spending 99% of my time paying attention to my day job.

Anyway, Odin is my favorite of the new systems languages. Lightweight, ergonomic, decent stdlib. It’s quite good.

[−]christophilus · 2026-11-15 Sun 18:57 UTC · link
For the record, the library I used was Skald[0]. It's decent. Not 100% fully featured yet, but performant and fairly low resource, especially compared to Quickshell.

[0] https://github.com/BuLEEto/Skald

[−]DASD · 2026-11-15 Sun 16:08 UTC · link
What's the decision-making in choosing Odin over something similar like C3 or Zig?
[−]Verdex · 2026-11-15 Sun 16:58 UTC · link
I can't speak for the implementor. And for that matter I also don't know what facilities c3 and zig provide.

However Odin comes prepackaged with a lot of bindings for helpful 3rd party libraries. Likely makes this sort of work a lot less tedious.

[−]vconnor · 2026-11-15 Sun 17:25 UTC · link
I have tried all three, and I chose Odin because I prefer the syntax (especially over Zig) and the vendored libraries are a killer feature for me. You get a lot of graphics, maths and gamedev-adjacent packages with the language, that can take you very far without having to shop for third-party packages.

Odin for me is the (low level) systems language nirvana, along with Elixir which is my distributed system nirvana. They spark so much joy.

[−]jazzypants · 2026-11-15 Sun 16:35 UTC · link
> - go style err!=nill style exception handling

Is this not widely considered to be the ugliest part of the language? Why do you prefer having to do this manually?

[−]ixwt · 2026-11-15 Sun 16:40 UTC · link
It is, which is why the or_return[1] keyword was created.

[1]: https://odin-lang.org/docs/overview/#or_return-operator

[−]iaaan · 2026-11-15 Sun 18:05 UTC · link
As someone who is primarily a Go dev, I never understood this criticism and have never seen a language do it any better (but I'm open to suggestions). I think try/catch is worse. I kinda like JS's promise syntax with the `.then()` and `.catch()`, but it doesn't appear that different to Go's approach.
[−]vips7L · 2026-11-15 Sun 18:45 UTC · link
Personally I think Go style is worse, because the runtime and compiler don't force you to handle the error. I just had to fix a critical issue because a dev forgot to check the result coming from a function, exceptions would have forced it to happen.
[−]wolttam · 2026-11-15 Sun 18:27 UTC · link
Errors as values instead of some special language construct is generally a nice thing (IMO)
[−]vips7L · 2026-11-15 Sun 18:31 UTC · link
Exceptions are values. There's nothing different between:

    T someFn() throws E;
    fn someFn() -> Result<T, E>;
    func someFn() (T, E)
[−]Dr_Emann · 2026-11-15 Sun 19:09 UTC · link
In only one of those examples do you get a T that's invalid.
[−]phplovesong · 2026-11-15 Sun 17:42 UTC · link
Did not C3 basically render Odin useless? Its basically C that did not stagnate in the mid 90s.