You must log in or register to comment.
this is incredibly cursed. i love it.
I saw
while(i --> 0)
in someone else’s code and thought wth is this-->
operator? Then I realized it’swhile(i-- > 0)
and thought cool, I gotta do this!Thanks, i hate it
That won’t work if
i
is unsigned.It’s beatuful!
Takes 1 more character, that’s bloat.
2 more
Isn’t the evaluated value different from the expression?
i++
returns the value of i before increasing.i-=-1
would return the value after it has been increased. Wouldn’t it be more correct to make it equal to++i
If you’re hell bend on achieving the goodness of
i++
equivalent you could wrap it up like this:
(i-=-1,i-1)
We’re talking C here of course.