[Haskell-cafe] Why are && and || right-associative?

Stefan Monnier monnier at iro.umontreal.ca
Sat Apr 13 02:28:07 UTC 2019

> I think Brandon's point is that short-circuiting is in fact an example of
> lazy evaluation, regardless of the language being otherwise strict.

Sure, call it "short-circuiting", my comment stays the same:
in which way is it related to *associativity*?

In terms of semantics, all three (++), (||), and (&&) are associative
AFAICT, so the choice of which associativity to use in the syntax is not
related to the semantics (instead it's likely related to secondary
concerns like efficiency).


More information about the Haskell-Cafe mailing list