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.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of months

months

Related news:

News photo

Mizuno USA says hackers stayed in its network for two months

News photo

DrDisrespect studio Midnight Society announces closure four months after "significant" layoffs

News photo

LinkedIn passes $2B in premium revenue in 12 months, with overall revenue up 9% on the year