logoalt Hacker News

krackers • today at 1:38 AM • 2 replies • view on HN

Oh I remember this from the classic SO post, but it was just presented as a funny trick. I never realized that it solves the issue mentioned in the article and there is a legitimate use-case for post-decrement in the comparison itself.

https://stackoverflow.com/questions/1642028/what-is-the-oper...


Replies

1718627440 • today at 3:58 AM

There is a reason postfix is the idiomatic way in C, it is the correct choice most of the time.

➕ show 2 replies
StilesCrisis • today at 3:46 AM

It's just spacing. X-- > 0 and X --> 0 are the same thing in C.