|
|
|
|
|
by SAI_Peregrinus
2957 days ago
|
|
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. |
|