3 ms·
In Zig strings are assumed to be UTF8 unless documented otherwise, so any function operating on strings is not wasting CPU cycles doing any validation. The pers
by slimsag 3y ago
In Zig strings are assumed to be UTF8 unless documented otherwise, so any function operating on strings is not wasting CPU cycles doing any validation. The person who creates the string is expected to ensure it is valid UTF8 if needed.
- tialaramex 3y agoThis is the "Just don't write bugs" that we laugh at for C and C++.
- Ygg2 3y agoIf there is one thing Ada does better than Rust, is that it encodes the invariants in the type system. While Rust doesn't goes as far as I would have want it's miles better than what Zig and C are doing - the programming equivalent of "Trust me bro!".