logoalt Hacker News

tromplast Tuesday at 9:29 PM2 repliesview on HN

Funny how correct is not associated with right. The normal association is reflected in he Haskell Either datatype for describing computations that either run into some error (Left error) or run successfully producing a value (Right value).


Replies

lolinderlast Tuesday at 11:34 PM

That's because the association isn't right or wrong, it's progressing or not progressing, deriving from reading order. A Left value typically halts computation there and returns something to the user, whereas a Right value allows you to move on.

One nice side effect of tying the mnemonic to reading direction rather than homonyms is that it carries over across languages better (though still imperfectly).

Centigonaltoday at 4:15 AM

a sinister observation, dexterously phrased.