either
either copied to clipboard
Add some examples/rationale at the top of the documentation *why* one might want to use Either and what for
It's all very generic, so for users ending up at the documentation it's not entirely clear what this is actually good for. Why would one want a type that is like Result
but unbiased?
No need to answer that in the issue, I know but having this in the documentation in an understandable way would be useful :)
It's not like Result, so whoever writes the PR, don't start with comparing to Result.
Indeed, that's part of the problem, the docs say to use Result
for describing errors and that Either
is general purpose... but not what kind of purposes for example it would be useful for :)
I don't have any good suggestion how to write those docs though, I'm not good with writing docs.
I found this crate after specifically looking for this exact Iterator
implementation, so, for me, that was the compelling use case.
I found this crate being used in a large codebase and had/have no clue what it does. Reading the introduction didn't clarify it for me, it's too abstract and generic without a use case or example. I would also welcome an explanation of what a "sum type" is.