logoalt Hacker News

tsimionescu • today at 3:32 PM • 0 replies • view on HN

The first expression is fine, as it uses extremely commonly known precedence rules. The second is more arguable.

However, the following expressions should be invalid in any language, and no one should write them even in languages where they are unfortunately allowed:

  a + b >> c & d && 0 % 9

  a >> 4 ? b : c & d ^ 7