logoalt Hacker News

dwattttttoday at 8:03 AM2 repliesview on HN

Zig does claim that it

> ... has a debug allocator that maintains memory safety in the face of use-after-free and double-free

which is probably true (in that it's not possible to violate memory safety on the debug allocator, although it's still a strong claim). But beyond that there isn't really any current marketing for Zig claiming safety, beyond a heading in an overview of "Performance and Safety: Choose Two".


Replies

gf000today at 11:33 AM

Runtime checks can only validate code paths taken, though. Also, C sanitizers are quite good as well nowadays.

tomnipotenttoday at 8:50 AM

That's a library feature (not intended for release builds), not a language feature.

show 1 reply