Hacker News new | ask | show | jobs
by tialaramex 715 days ago
The warning says to add parentheses, which sure enough silences the warning, your foot, however, still has a bullet hole in it.
2 comments

> The warning says to add parentheses, which sure enough silences the warning, your foot, however, still has a bullet hole in it.

The warning also says that it's an assignment. It's a pretty clear warning meant to force the programmer to do extra work to get the error.

The warning is very clear. If you did intend to use the result of an assignment as truth value, you would notice. In any case, did not have a single problem with this type of error in the last decades, working with programmers of various skill levels including beginners.