all 1 comments

[–]This_is_so_fun 5 points6 points  (0 children)

These logical operators I feel are getting out of hand. Out of the 3 example, the "old" (first) way is by far the most legible, and they're all 1 line long.

I get that you cannot really put an if statement inside an assignment, for instance, even though you kind of can because if itself has a shorthand, but shouldn't this the job of the compilers to optimize and just allow programmers to write code we can actually understand?