Get the latest tech news
Zig; what I think after months of using it
- What I like - What I like less - Error handling - Shadowing is forbidden - Compile-time duck typing - No typeclasses / traits comptimeis probably not as interesting as it looks - No encapsulation - Memory safety is highly underestimated and fallacious - Lazy compilation and compilation errors instead of warnings - No destructors - No (unicode) strings - Conclusion: simplicity rhymes with unrestricted power, which rhymes with… Ah, Zig. I have a love-hate relationship with this one.
Zig was made to run at low-level, with a simple design to solve many problems C has (macros, allocators, error handling, more powerful types like baked-in tagged unions and bitsets, a better build system, no hidden control flow, etc.). Zig build module is not very complex to understand and allows a great deal of flexibility when configuring your targets, optimizations, CPU architectures, ABI, CLI options, steps and all. This is incredibly error-prone, and the mere fact that even the standard library fails to abide by the very first rule of zig zen proves the point that communicating intent precisely via documentation is hard, and probably not a good design decision for a modern language.
Or read this on Hacker News