26

++ if you did it at least once 😀
I can only say that's way i love java's .equals() ❤

Comments
  • 5
    Not in Java, but I think every dev has done that atleast once.
  • 3
    Why did they allow variable assignment in a if(…) statement in C?
  • 1
    @monkcs
    `if (expression) { ... }`

    `x = 5` is an expression

    Besides, it's useful as-is. Just because it's possible to write something that behaves in an unintended way doesn't mean it needs changing. In fact, building a language that polices every line to ensure only proper-looking code is allowed would be both extremely difficult to do, and extremely frustrating (and limiting) to use.

    But of a strawman, but 😋
Add Comment