8 ms·
What you are describing is option types, which are an entirely valid and very useful construct that helps make programs more rather than less reliable. But you
by lambdaone 3mo ago
What you are describing is option types, which are an entirely valid and very useful construct that helps make programs more rather than less reliable. But you need proper language type system support and compile-time enforcement to make it work, and C does neither of those.
- bnolsen 3mo agoC++ and rust make these optionals ugly. Zig does it right. Zig also forbids null pointers and requires use of optionals.