|
|
|
|
|
by flohofwoe
1710 days ago
|
|
Zig fixes many more memory safety issues than C or C++ though, simply by being less "sloppy" and enforcing more correctness (e.g. no implicit type conversions, no over/underflows, proper range-checked arrays and slices etc...) - IME most memory corruption issues in C and C++ are actually secondary effects of such simple correctness issues. Zig just isn't quite as "extremist" as Rust (also, Rust is a great language for writing a sandbox, but if a memory-safe language must be used inside the sandbox to prevent damage outside the sandbox, then it simply isn't a sandbox. |
|
[1]: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#...