A NES emulator written in Odin
https://lucypero.com/lucynes.html- 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.
Is this not widely considered to be the ugliest part of the language? Why do you prefer having to do this manually?
Common in ML-family languages and Rust. They've been brought into most mainstream languages like Java by now because of how useful they are.
Where Maybe is a polymorphic union of T and nil but the core library returns either (T, bool) or (T, E) where E is an error enum.
[1]: https://odin-lang.org/docs/overview/#or_return-operator
T someFn() throws E;
fn someFn() -> Result<T, E>;
func someFn() (T, E)I believe some exceptional languages are similar, like Ruby. If you rescue but dont abort, the variable on the left hand side gets a nil when that may otherwise not be possible. Of course, that is handled cleanly as its own error.
Anyway, Odin is my favorite of the new systems languages. Lightweight, ergonomic, decent stdlib. It’s quite good.
Odin for me is the (low level) systems language nirvana, along with Elixir which is my distributed system nirvana. They spark so much joy.
However Odin comes prepackaged with a lot of bindings for helpful 3rd party libraries. Likely makes this sort of work a lot less tedious.
https://github.com/Quad4-Software/Ren-TUI
Reticulum in Go:
https://github.com/Quad4-Software/Reticulum-Go
On Odin itself, it looks really simple, and I'd love it if it were self-bootstrapable or compilable with just a C99 compiler like cparser, cproc or TCC.