3 ms·
There's got to be more to it than "has / doesn't have nil". Lisp has nil, and I rarely if ever see an analogous error there, or even a type error. I have a hu
by ken 8y ago
There's got to be more to it than "has / doesn't have nil". Lisp has nil, and I rarely if ever see an analogous error there, or even a type error.
I have a hunch that single/static dispatch is what tends to cause more problems than merely the presence of nil. It's not nil, but how you use it.
- akjha 8y ago"It's not nil, but how you use it." Can you elaborate on how multi-dispatch reduces the issue of nil/null? I also use static type (typescript) to prevent issues with nil and would like to know how I can achieve the same in a dynamic language.
- jashmatthews 8y agoYou can prevent nil errors using contracts like in Eiffel and Clojure.