Hacker News new | past | comments | ask | show | jobs | submit login

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: