Hacker News new | ask | show | jobs
by brabel 772 days ago
This is trivial to model by making your type `T | null | Missing`.
3 comments

Or just using Option since you would have Some<null> or None in that case.
Maybe trivial to “work around” but there is a difference, ay?

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.

Only if you're designing both functions ahead of time. In other words, it's not composable.