3 ms·
Ask HN: Why is Zig gaining so much popularity lately?
- satvikpendem 3y agoIs 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.
- moooo99 3y agoI think OP may be judging the popularity of Zig by social media popularity, which is an interesting but not reliably proxy. Regarding the notable programs, you are of course right. But considering Zig hasn’t even had a stable release and is currently in 0.11, I think it’s impressive that there already is a very notable project being implemented in it. Judging by that decision, I would assume Zig has some very convincing features that make it worth taking the risk of being an early adopter.
- kristoff_it 3y agoThe most relevant uses of Zig that come to mind are: - Bun, as you mentioned - https://tigerbeetle.com/ https://tigerbeetle.com/ - https://www.uber.com/en-IT/blog/bootstrapping-ubers-infrastructure-on-arm64-with-zig/ https://www.uber.com/en-IT/blog/bootstrapping-ubers-infrastr... Plus a bunch of other companies (including some very big ones) and projects that use Zig here and there, eg AWS uses cargo-zigbuild https://github.com/awslabs/aws-lambda-rust-runtime/blob/e2d51ad4e3bb2c04162049eaf4b50cbdff0fe06c/Makefile#L22 https://github.com/awslabs/aws-lambda-rust-runtime/blob/e2d5... Zig also has a few other very promising OSS projects: - https://github.com/riverwm/river https://github.com/riverwm/river (wayland compositor) - https://github.com/ZigEmbeddedGroup/microzig https://github.com/ZigEmbeddedGroup/microzig (HAL for embedded development) - https://machengine.org/ https://machengine.org/ (truly cross-platform gamedev) - https://github.com/michal-z/zig-gamedev https://github.com/michal-z/zig-gamedev (another serious gamedev toolkit) Just off the top of my mind. Like for all things, you gotta get started somewhere and this is where we are at the moment.
- mindwok 3y agoMany 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 3y agoHard 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 3y agoMy 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=37447960 https://news.ycombinator.com/item?id=36996756 https://news.ycombinator.com/item?id=36996756 https://news.ycombinator.com/item?id=37449994 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 https://www.youtube.com/watch?v=VJdDdqWmQtk
- deleted 3y ago[deleted]