Erlang Forums
Read post

On `or` and `and` operator deprecation

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`.

    #erlang#compiler-optimization
Yesterday•2m read time•From erlangforums.com
Post cover image
9 Impressions
Erlang Forums's image
Erlang Forums

Erlang Forums is a community-driven platform for discussions related to the Erlang programming langu...

35 Followers

•

85 Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard