(no title)
hexane360 | 1 year ago
As a concrete example, consider a map with a method get(key: K) -> Option<V>. How do you tell the difference between a missing key and a key which contains `null` as a value?
hexane360 | 1 year ago
As a concrete example, consider a map with a method get(key: K) -> Option<V>. How do you tell the difference between a missing key and a key which contains `null` as a value?
brabel|1 year ago
epolanski|1 year ago
efnx|1 year ago
With this type you would have to check/match an extra case!
The type you use there also takes more memory than Option<T> or Maybe<T>. So it has some other downsides.
hexane360|1 year ago
epolanski|1 year ago
It's like saying `string | "foo"` it is simply `string` due to subtyping.
hexane360|1 year ago