Golang developers should try Odin
For over a decade, I've been using Golang, and despite trying other programming languages, I always returned to it due to its simplicity. While it's true that Golang's garbage collector and runtime can be problematic, I still prefer it over other languages. That's why I was excited to try Odin, a language I discovered a week ago.
Odin, often thought to be only for game development because of its 3D libraries, is also suitable for backend development. It possesses a core library akin to Golang's standard library, enabling us to utilize the same building blocks as Go's libraries. Beyond its 31 keywords, Odin offers unique features such as array programming, struct tags, and even quaternions, which are absent in languages like Rust, Zig, C3, and Hare.
Unlike Golang, Odin doesn't have a package manager, go.mod file, or a garbage collector. It necessitates manual memory management, which may seem daunting to some. However, Odin's pre-defined directives and attributes make it easier to understand the code without prior knowledge. It doesn't have macros, comptime, constexpr, or decorators either, which I believe is a good thing.
Odin's approach to error handling is also different. It doesn't have a specific error type like Golang, but uses Enums, Unions, and Structs instead. This allows for error trees of switch statements, providing user-friendly error messages. Odin also lacks interfaces, but they can be emulated using Odin's unique interface structures.
Despite its lack of documentation and books, Odin feels familiar to those experienced in Golang. It's a language that will stay stable until you retire, and its compiler and toolchain are continuously improving. For those interested, a 10-minute read of demo.odin can provide ample information to get started.
Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.