3 ms·
Zig doesn't offer garbage collection. And also no Rust's complex memory tracking. So it's doesn't really free you from memory-related bugs, just like good-old C
by deepsun 4y ago
Zig doesn't offer garbage collection. And also no Rust's complex memory tracking. So it's doesn't really free you from memory-related bugs, just like good-old C. But it's a "better C" IMHO.
- pverghese 4y agoYou just need to link in boehm c implementation and use that as the allocator just like chooosing any other allocator in zig. That's how easy it is.
- Arnavion 4y agoThey're saying the lack of GC is an advantage over golang, not that it's a deficiency. Or if you're suggesting a GC to solve the memory unsafety, a GC only solves leaks and doesn't do anything for use-after-free or simultaneous unexpected mutations.
- pverghese 4y agoI'm saying you have the option to use a gc or not. It's as simple as changing the allocator you use