Hacker News new | ask | show | jobs
by fipple 2878 days ago
In what language do those produce different results?
1 comments

In many people’s head-parser, the first one looks like an equality check (but is in fact assignment). The parens try to clue people into “this is an assignment expression!” I think, but personally I wouldn’t allow an assignment expression in an if statement even with parens.