Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
kamen69885y@s0LA Would it even matter whether it's ++i or i++ if you're not assigning the value to another variable?
-
Can also be a sign of when you came up and where, kind of like how some people still religiously put the constant on the left side of comparisons bc C. For this instance, Actionscript for example had cases where i+=1 would be significantly faster after compilation, and cases where it would be slower. Just historical leftovers.
-
@s0LA Well, at my job I often do i++ without problems, though I did find some cases where i++ was a problem and I really needed ++i, indeed.
People can judge you between i++ and i+=1
random