4 ms·
There's a lot to like about Zig, especially related to metaprogramming. Unfortunately, bulletproof memory safety is table stakes for a modern language. Without
by fleventynine 3y ago
There's a lot to like about Zig, especially related to metaprogramming. Unfortunately, bulletproof memory safety is table stakes for a modern language. Without a garbage collector or borrow checker, Zig is DOA for any use case that involves untrusted data.
Maybe there's a few niches (single player games?) that don't need memory safety...
- TUSF 3y agoYou can always use a garbage collecting allocator with Zig, if you're that paranoid anout it.
- pjmlp 3y agoFor that better use D, Nim, Swift, C#, Go, designed from the ground up with one in mind, and whole ecosystem counts on it, instead of having coloured libraries.
- TUSF 3y agoBy convention, all Zig libraries have functions that take an allocator as input from the user. Your application can use libgc[1] and pass the allocator to any library function you use, and not worry about deallocating afterwards. [0]: https://github.com/linusg/zig-libgc https://github.com/linusg/zig-libgc