5 ms·
It seems that Odin and Zig target similar use cases. How do they compare?
by fire_lake 2y ago
It seems that Odin and Zig target similar use cases.
How do they compare?
- fallingsquirrel 2y agoI 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).
- flohofwoe 2y agoZig allows default values in the struct declaration which eases the pain quite a bit (while still making it impossible to forget initializing items).
- fallingsquirrel 2y agoFunny 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.
- fire_lake 2y agoThis is a tiny difference in the context of all language design decisions!
- deleted 2y ago[deleted]
- dsego 2y agoHere are some references, I think Odin is more tasteful and sensible with a cleaner syntax. https://www.gingerbill.org/article/2019/05/13/a-reply-to-the-road-to-zig/ https://www.gingerbill.org/article/2019/05/13/a-reply-to-the... https://www.youtube.com/watch?v=vFFcCLzOOyw&t=676s https://www.youtube.com/watch?v=vFFcCLzOOyw&t=676s https://news.ycombinator.com/item?id=36162056 https://news.ycombinator.com/item?id=36162056