<@U5MPVGMQD> `Some(null)` makes sense in programs ...
# arrow
r
@aeruhxi
Some(null)
makes sense in programs that treat null as a valid values but agreed it should be avoided. The reason why we support it is because otherwise it can yield undesired behaviors for programs that inter-op with java and receive null as valid values. https://stackoverflow.com/questions/5796616/why-somenull-isnt-considered-none Additionally I believe the other way around it would violate some of the identity laws in some of the type classes (untested). As for
none()
and
None
they are the same:
Copy code
fun <A> none(): Option<A> = None