On Saturday, 29 February 2020 at 12:50:59 UTC, Adnan wrote:
* Option!T from the optional package: Has even worse problem IMO. Not only it allows None + int but also it returns a `[]`. This API is not to my liking. You could say well Haskell has fmap for Optional etc, and I am aware of that, so does Rust with map etc. But I am talking about basic things: like `+`.

I would argue it is one of its strengths.

Regardless, I don't think option/nullable/maybe is a good type for errors. Rather you should use something like SumType!(T, Error), or any other 'either' type.

Reply via email to