Odin: Moving Towards a New "core:OS"
odin-lang.org
Odin: Moving Towards a New "core:OS"
1–10 of 102 posts
Re: Odin: Moving Towards a New "core:OS"
#2Re: Odin: Moving Towards a New "core:OS"
#3Odin claims to be pragmatic (what language doesn't lol) but "All procedures that returned allocated memory will require an explicit allocator to be passed". Charitably, is this aimed at c/zig heads?
Re: Odin: Moving Towards a New "core:OS"
#4PS: I just read a funny comment on YT video: "Odin feels like a DSL for writing games masquerading as a systems language."
Re: Odin: Moving Towards a New "core:OS"
#5I have an important metric for new "systems" languages: does the language allow NULL for it's commonly used pointer type. Rust by default does not (References may _not_ be NULL). Here is where I think Odin makes a mistake.
In the linked blog post Odin mentions ^os.File which means pointer to File (somewhat like *FILE in C). Theoretically the pointer can be NULL. In practice, maybe I would need to check for NULL or maybe I would not (I would have to scan the Odin function's documentation to see what the contract is).
In Rust, if a function returns &File or &mut File or Box etc. I know that it will never be NULL.
So Odin repeats the famous "billion-dollar mistake" (Tony Hoare). Zig in comparison is bit more fussy about NULL in pointers so it wins my vote.
Currently this is my biggest complaint about Odin. While Odin packages a lot of power programming idioms (and feels a bit higher level and ergonomic than Zig) it makes the same mistake that Golang, C and others make regarding allowing NULL in the default pointer type.
Re: Odin: Moving Towards a New "core:OS"
#6I've been actively toying with Odin in past few days. As a Gopher, the syntax is partially familiar. But as it is a lower level language wiht manual-ish memory management, simple things require much more code to write and a ton of typecasting. Lack of any kind of OOP-ism, like inheritance(bad), encapsulation(ok), or methods(nobrainer), is very spartan and unpleasant in 2025, but that's just a personal preference. I d…
Zig doesn't have interfaces as a language level feature. It uses manually implemented vtables and wrapper methods.
You can do the same in Odin with wrapper functions around a vtable.
Re: Odin: Moving Towards a New "core:OS"
#7Odin claims to be pragmatic (what language doesn't lol) but "All procedures that returned allocated memory will require an explicit allocator to be passed". Charitably, is this aimed at c/zig heads?
All procedures in core/os. Odin isn't removing the allocator from implicit context in the rest of its APIs.
Re: Odin: Moving Towards a New "core:OS"
#8Odin claims to be pragmatic (what language doesn't lol) but "All procedures that returned allocated memory will require an explicit allocator to be passed". Charitably, is this aimed at c/zig heads?
Re: Odin: Moving Towards a New "core:OS"
#9I've been actively toying with Odin in past few days. As a Gopher, the syntax is partially familiar. But as it is a lower level language wiht manual-ish memory management, simple things require much more code to write and a ton of typecasting. Lack of any kind of OOP-ism, like inheritance(bad), encapsulation(ok), or methods(nobrainer), is very spartan and unpleasant in 2025, but that's just a personal preference. I d…
> even Zig has methods and interfaces Zig doesn't have interfaces as a language level feature. It uses manually implemented vtables and wrapper methods. You can do the same in Odin with wrapper functions around a vtable.
Re: Odin: Moving Towards a New "core:OS"
#10I like Odin and hope for it to gain more momentum. I have an important metric for new "systems" languages: does the language allow NULL for it's commonly used pointer type. Rust by default does not (References may _not_ be NULL). Here is where I think Odin makes a mistake. In the linked blog post Odin mentions ^os.File which means pointer to File (somewhat like *FILE in C). Theoretically the pointer can be NULL. In p…