Re:Zig gamedev project – left my job to build games in Zig lang
by flohofwoe on Monday October 18, 2021 @06:10AM
(#28903888)
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.
[ Parent
| on HN ]
Re:Zig gamedev project – left my job to build games in Zig lang
by pcwalton on Monday October 18, 2021 @04:12PM
(#28910993)
All of these are available and widely used in C++ (for example [1]). They are not enough.
[1]: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#...
Re:Zig gamedev project – left my job to build games in Zig lang
by flohofwoe on Monday October 18, 2021 @06:29PM
(#28912628)
"Widely used" might be a bit of an exaggeration, MSVC only added address sanitizer support very recently but doesn't support any of the other sanitizers, and none of the sanitizers are enabled by default in Clang.