News for hackers. Stuff that matters.
Re:The Logical Disaster of Null by SAI_Peregrinus on Thursday May 10, 2018 @11:33PM (#17044795)
I feel like the idea of null is fine, but the implementations are idiosyncratic. Null is an unknown/unknowable/invalid value. You can't know if null = null. This should be an exception or other error. You can't know if 10 = null. Null is unknown. It might be 10, it might not. This should be an exception or other error. You can't have a meaningful result of 10 * null. A pointer to null is meaningless.

Languages which lack a way to signify an error other than null can be an issue. Most modern languages have option types and/or exceptions, both of which provide good ways to deal with error conditions.

There are no comments on this comment yet.