Hacker News new | ask | show | jobs
by stephen_g 4984 days ago
Basically, somebody sees some code with two operators (decrement and less than) with no whitespace between them and thinks it's a single operator.

The answer that shows it with the brackets is probably the clearest:

    while ((x--) > 0)
    { ... }
The compiler sees that as the same as (x--> 0)

So it checks if x is more than zero and then decrements it each loop iteration.