logoalt Hacker News

aw1621107today at 1:52 AM2 repliesview on HN

> Also, Zig's spatial and memory safety is as good as Rust's

Is there a word missing before "memory"? Seems odd to specifically call out spatial memory safety when memory safety subsumes it.


Replies

ngrillytoday at 12:37 PM

That's because Zig offers spatial memory safety (e.g. buffer overflows and index out of bounds), but no temporal memory safety (e.g. use-after-free). I suppose the "and" before "memory safety" is a typo.

steveklabniktoday at 3:51 AM

Usually people say “spatial” vs “temporal”.