Hacker News new | ask | show | jobs
by lambdaone 2 hours 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.
1 comments

C++ and rust make these optionals ugly. Zig does it right. Zig also forbids null pointers and requires use of optionals.