Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Zig is warts-free C, but you can use them together. You can gradually refactor your C codebase, Zig can even transpile C. Zig is also a standalone C toolchain, compiling and cross-compiling C is a breeze with it, and it has it's own libc implementation.


it does not have it's own implementation of libc, it just makes easier to work with implementations of libc and letting the cross compile, I think it was like that.

However a libc is a thing that zig probably wants and something I am also thinking on doing if I have the time


It doesn't fix C flaws like use after free, hardly warts-free.


That's not a C flaw, you can use an allocator that prevents use-after-free.

https://github.com/bwickman97/ffmalloc

The point of C and Zig is that they are low level and you can do whatever, like not use an allocator, or write an allocator.


Just like C memory debuggers for the last 30 years, so what is the benefit?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: