HACKER Q&A
📣 gilga

Why is Zig gaining so much popularity lately?


Why is Zig gaining so much popularity lately?


  👤 satvikpendem Accepted Answer ✓
Is it? I only know of Bun but I've not heard of any other Zig programs. In contrast, with languages like Go or Rust, there are any number of notable programs being built that many people have heard of. You might just be taking the popularity of one example, Bun, and extrapolating that as evidence that the language itself, Zig, is gaining much popularity.

👤 mindwok
Many people love C for its simplicity but dislike some footguns of C like lack of bounds checks, lots of undefined behaviour, lack of modern features like package management and easy cross compiling etc. When Rust came along it solved a lot of the pain points but is more similar to C++ with its large feature set and standard library, generics, powerful macros etc. which was never embraced by this crowd because it was a different approach to C's simplicity and minimalism.

Zig is kind of a sweet spot for those who prefer the simplicity of C but want something more modern. On top of that it has some cool novel approaches to some things, like comptime for generic programming and custom allocators supported by the standard library that make it interesting enough on its own anyway. Plus,


👤 countWSS
Hard to explain why, but Zig/C are both operating in space of hobby projects, where being "easy to learn, hard to master" is criticial to tinkering/optimizing/exploring: this is in contrast to "building big systems" approach for serious software, where you follow design-rule-implement chains of components working as prescribed.

👤 kristoff_it
My recommendation is to try the language first hand.

If you can't see right away why people care, then try asking around (ie any of the Zig communities) for insight on specific use cases. Give it a fair shake and see where you end up.

Asking right off the bat why something is getting popular is basically begging for marketing pitches, plenty of which you can already find on HN on every single thread that mentions Zig:

https://news.ycombinator.com/item?id=37447960

https://news.ycombinator.com/item?id=36996756

https://news.ycombinator.com/item?id=37449994

etc

To give you a more interesting answer, the Zig Software Foundation is a 501c3 non-profit organization (the c3 means that it's tax-exempt, unlike c6 orgs) that pays core contributors, which means we can move the project forward steadfast.

There are also more "subtle" (ie actually very blatant, but people in tech most of the time don't realize how important these things are) reasons that I talk about in the latest Software You Can Love keynote: https://www.youtube.com/watch?v=VJdDdqWmQtk


👤 templix
Great C replacement, great community. That's enough for many.