The names "left" and "right" Lassi Kortela (05 Jun 2020 15:27 UTC)
Re: The names "left" and "right" Marc Nieper-Wißkirchen (05 Jun 2020 15:39 UTC)
Re: The names "left" and "right" John Cowan (05 Jun 2020 16:35 UTC)
Re: The names "left" and "right" Lassi Kortela (05 Jun 2020 17:08 UTC)
Re: The names "left" and "right" Marc Nieper-Wißkirchen (05 Jun 2020 17:17 UTC)
Re: The names "left" and "right" John Cowan (05 Jun 2020 17:18 UTC)

Re: The names "left" and "right" Marc Nieper-Wißkirchen 05 Jun 2020 15:39 UTC

Am Fr., 5. Juni 2020 um 17:28 Uhr schrieb Lassi Kortela <xxxxxx@lassi.io>:

> Would it be possible to use more obvious names for the Left and Right
> subtypes of Either? I know Left and Right are somewhat classic, but they
> are also somewhat arbitrary and confusing.

Not at all!

Either can be used either (no pun intended) to model an Ok/Err type or
to model a type with two symmetric alternatives.

For the first application, we use "Right" in the sense of right = true
= correct = ok. In this case, Ok/Err would also be ok (another pun not
intended).

For the second application, Left/Right is perfect because of its
symmetry. Ok/Err wouldn't make sense at all.

Marc