News for hackers. Stuff that matters.
Re:A Reply to “Let’s stop copying C” by MaxBarraclough on Saturday January 25, 2020 @08:32PM (#22149818)
I agree that's also a valid point.

The solution is for the language to offer 'option types', which essentially force you to check for null. Zig does this, and the result is much nicer than how things work in C: https://ziglang.org/documentation/master/#Optionals

Re:A Reply to “Let’s stop copying C” by setr on Sunday January 26, 2020 @04:56AM (#22151325)
More importantly, they let you safely not check for null (because with null-types, you should really always be handling it, because anything can go from never-null to null-in-this-one-case without warning)
Re:A Reply to “Let’s stop copying C” by ctidd on Saturday January 25, 2020 @11:57PM (#22150462)
And options help with solidifying input contract as well as the output. Knowing what's an acceptable input via a type system is just as relevant as knowing what is a potential output.