4 ms·
There are as many kinds of nils as programming languages. Cixl [0] doesn't derive nil from every other type, instead Nil and most other types derive Opt; which
by bgongfu 8y ago
There are as many kinds of nils as programming languages.
Cixl [0] doesn't derive nil from every other type, instead Nil and most other types derive Opt; which means that user code may specify Opt to accept nil or any other type to have them automatically trapped by function dispatch. I find this to be a nice compromise between wrapped optionals and shooting from the hip.
[0] https://github.com/basic-gongfu/cixl#optionals https://github.com/basic-gongfu/cixl#optionals