3 ms·
The “brilliance” is not having four nulls - that honestly more of a step down the road to use specific null values. The brilliance is the nil messaging semanti
by olliej 5y ago
The “brilliance” is not having four nulls - that honestly more of a step down the road to use specific null values.
The brilliance is the nil messaging semantic, it allows you to write concise code with a single error check at the end of appropriate, e.g:
[[[foo bar:wibble] thing:1, thing: 2].wat again]
Without having to have error check after error check after error check.
These worked together, that return nil had so little cost on the API, you were able to have more error checks that return nil instead of trying to create some kind of fake value. Because you have so many error returns you have to check a lot if you didn’t have nil messaging.
Our belief of what makes things good language design have changed a tiny bit in the intervening years :)