Skip to content

Comment on Marketing the Odin programming language is weird

Comments

It seems that Odin and Zig target similar use cases.

How do they compare?

I evaluated both some time ago. The standout difference for me was Zig requires you initialize all variables and struct fields explicitly, but Odin implicitly initializes variables and forgotten struct fields to their "zero value" (0/null).

This is a tiny difference in the context of all language design decisions!

Zig allows default values in the struct declaration which eases the pain quite a bit (while still making it impossible to forget initializing items).

Funny you should say that. I don't find it painful at all, I prefer the explicitness. I just wanted to relay my experience without unnecessarily bundling my opinion, since this is a thread about Odin after all.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.