4 ms·
Yeah, I agree, and I like C! I think the lack of bounds checks where they are not a problem is a massive design flaw nowadays. Zig should have made bounds chec
by ghoward 4y ago
Yeah, I agree, and I like C!
I think the lack of bounds checks where they are not a problem is a massive design flaw nowadays. Zig should have made bounds checks universal and spent effort on compiler passes to elide them.
Allowing people to remove bounds checks is not smart (though Rust's unsafe is a good compromise), especially in such a coarse way as a build option.
In fact, a supposedly memory-safe language, Julia, has memory bugs because it allows users to turn bounds checks off. [1] This should never have happened.
[1]: https://yuri.is/not-julia/ https://yuri.is/not-julia/