Re:Bottom Type in F#
by StreamBright on Wednesday September 23, 2020 @04:50AM
(#24564628)
It is not a dumb question. Null has many drawbacks compare to bottom types. In many languages is is part of other types so that your code happily compiles with a function that has String as an input parameter and gets a null. This is why you see in Java a lot of null checking usually. In ML languages people decided to do better and started to use Some / None, etc. which needs to be handled explicitly, so you do not forget null checking accidentally.
[ Parent
| on HN ]
There are no comments on this comment yet.