Earlier quoted context omitted.
> a footgun is a surprising defect that's pointed at your foot and easy to trigger Close, but not the way I think of a footgun. A footgun is code that was written in a naive way, looks correct, submitted, and you find out after submitting it that it was erroneous. Good design makes it easy for people to do the right thing and difficult to do the wrong thing. In Rust it is extremely easy to hit the borrow checker incl…
> A footgun is code that was written in a naive way, looks correct, submitted, and you find out after submitting it that it was erroneous. You’re contradicting yourself a bit here I think. Erroneous code generally won’t compile whereas in Zig it will happily do so. Also, Zig has plenty of foot guns (eg forgetting to call defer on a deinit but even misusing noalias or having an out of bounds result in memory corruptio…
The only major UB from C that zig doesn’t address is use after free afaik. How is that largely unchanged???
Just having an actual strong type system w/o the “billion dollar mistake” is a large change.