News for hackers. Stuff that matters.
Re:A Reply to “Let’s stop copying C” by chongli on Saturday January 25, 2020 @07:16PM (#22149525)
You're right. The mistake is not in having null pointers, it's lacking non-nullable references which is the problem. If you can write a function which only accepts a non-null reference, then you don't have to check in every function called from it.
Re:A Reply to “Let’s stop copying C” by AgentME on Sunday January 26, 2020 @12:45AM (#22150583)
+1. I think this is something that gets lost in discussions around null. Generally, everyone complaining about C's handling of nulls will recommend languages that make nullable-pointers opt-in by having non-nullable references and making them the default. The argument people make is not that C should somehow drop the entire concept of null; the argument is that people should use languages where a type has to opt-in to accepting null.