2 ms·
A programming language without the concept of NULL can be created in a way such that it is impossible for the program to crash. Elm is such an example of this.
by deltaonefour 4y ago
A programming language without the concept of NULL can be created in a way such that it is impossible for the program to crash. Elm is such an example of this.
Null solves the problem of missing values, but introduces the problem of undefined behavior. What happens to when you try to divide an integer with NULL? Often times the program just chooses to crash.
To be fair though the problem isn't null itself. It's the failure of null to be incorporated into the type system. Instead null is used as a value to bypass the type system and silently propagate through your program and finally cause an error when you try to do an operation on it.