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

So, Zig set out to solve all but the biggest issue with C?


The biggest issue with C is arguably buffer overflows, not use-after-free (Zig offers spatial but not temporal runtime memory safety).

If you want both, but don't want a Rust-style borrow checker (with all the restrictions this entails), use 'tagged-index-handles', those work just fine across all languages (and even make sense in Rust):

https://floooh.github.io/2018/06/17/handles-vs-pointers.html


That seems to be what OP is implying. I haven't used Zig, so I can't say. I suppose people who want to avoid memory management related bugs who can't acccept a GC language can use Carp.




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

Search: