it’s funny how vibes have shifted from Rust to zig now. I wonder what programming language will be the hype in 2026!
Zig Guide
11–20 of 60 posts
Re: Zig Guide
#12That, along with the number of memory-related issues in one of Zig’s most popular project, Bun.js [#2], gives me pause.
[#1]: https://github.com/ziglang/zig/issues/2646
[#2]: https://github.com/oven-sh/bun/issues?q=is%3Aissue+segfault
Re: Zig Guide
#13I love Zig and I love that it’s getting attention, but can someone convince me of its memory safety? One thing that surprised me is that returning pointers to stack-allocated memory doesn’t cause a compiler error — it just segfaults at runtime. This has been an open issue since 2019 [#1]. That, along with the number of memory-related issues in one of Zig’s most popular project, Bun.js [#2], gives me pause. [#1]: http…
Re: Zig Guide
#14I love Zig and I love that it’s getting attention, but can someone convince me of its memory safety? One thing that surprised me is that returning pointers to stack-allocated memory doesn’t cause a compiler error — it just segfaults at runtime. This has been an open issue since 2019 [#1]. That, along with the number of memory-related issues in one of Zig’s most popular project, Bun.js [#2], gives me pause. [#1]: http…
Re: Zig Guide
#15Zig is great, played with it a bit to compile to WASM and found it to be pretty easy to work with. That said, they're not winning on the docs, community and marketing front vs Rust. It's not really apples to apples, but it's a comparison people naturally draw.
For me, it's the library problem. I read the guide and think, "Wow, this is really great!" Then I read the cookbook, and it mostly says that things (like database connectivity, regex, options parsing, even HTTP GET) are not quite ready for prime time, and I should just call out to C. Obviously, it takes time for a language to get there; I don't really mean this as a criticism. But I'm just not interested in wrapping…
This is why everybody says just use some existing c lib
Re: Zig Guide
#16I love Zig and I love that it’s getting attention, but can someone convince me of its memory safety? One thing that surprised me is that returning pointers to stack-allocated memory doesn’t cause a compiler error — it just segfaults at runtime. This has been an open issue since 2019 [#1]. That, along with the number of memory-related issues in one of Zig’s most popular project, Bun.js [#2], gives me pause. [#1]: http…
Re: Zig Guide
#17I love Zig and I love that it’s getting attention, but can someone convince me of its memory safety? One thing that surprised me is that returning pointers to stack-allocated memory doesn’t cause a compiler error — it just segfaults at runtime. This has been an open issue since 2019 [#1]. That, along with the number of memory-related issues in one of Zig’s most popular project, Bun.js [#2], gives me pause. [#1]: http…
People say, “oh, it’s safer than C because tests can warn of missed deinits” but the fact is it isn’t memory safe by design and it’s not a priority for the language.
There are still reasons to use it and there are domains where memory safety isn’t a priority, but memory safety depends on the same mix of linters, code review, simple memory models, a deep understanding of how memory works, minimal dependencies and luck just like in C. Although none of those things will save you on their own or combined. If memory safety is a priority I’d consider other languages.
Re: Zig Guide
#18I love Zig and I love that it’s getting attention, but can someone convince me of its memory safety? One thing that surprised me is that returning pointers to stack-allocated memory doesn’t cause a compiler error — it just segfaults at runtime. This has been an open issue since 2019 [#1]. That, along with the number of memory-related issues in one of Zig’s most popular project, Bun.js [#2], gives me pause. [#1]: http…
Much better than C will ever be, but still with gotchas like use after free, or hardware mapped variables.
Re: Zig Guide
#19it’s funny how vibes have shifted from Rust to zig now. I wonder what programming language will be the hype in 2026!
To me, it seemed more like Rust and Zig started gaining popularity around the same time, a few years ago. Then people realized that Zig was in a much earlier state of development than they'd assumed, and had barely any resources to get into it, so the mindshare went mostly towards Rust alone. This is Zig is hitting a second wave.
I see zig catching up in popularity because people are appreciating the simplicity it is trying to achieve.
Re: Zig Guide
#20Earlier quoted context omitted.
To me, it seemed more like Rust and Zig started gaining popularity around the same time, a few years ago. Then people realized that Zig was in a much earlier state of development than they'd assumed, and had barely any resources to get into it, so the mindshare went mostly towards Rust alone. This is Zig is hitting a second wave.
It probably just because C++ is more popular than C. Rust is a C++ replacement and zig is a C replacement. I see zig catching up in popularity because people are appreciating the simplicity it is trying to achieve.