A discussion on the Erlang forums about the deprecation of the `and` and `or` boolean operators in OTP29. The original poster argues these eager operators serve a legitimate purpose when side effects of all function calls in a boolean expression must be evaluated. A key concern was whether the compiler might reorder calls — clarified by a compiler maintainer: the compiler does not reorder `and`/`or` arguments, but will rewrite them to short-circuiting operators if the right-hand side has no side effects. The recommended alternative is to assign each side-effectful call to a named variable first, then combine with `andalso`/`orelse`.
9 Impressions