++ Increment Operator Debate
Discussions focus on the use, equivalence, and quirks of increment operators like ++ versus +1 or +=1, including pre- vs post-increment differences and behaviors in languages such as JavaScript and C.
Activity Over Time
Top Contributors
Keywords
Sample Comments
For example it would not be weird to have ++ instead of +1.
Shouldn't we programmers be just typing "++"?
Don't forget that the ++ operator has been added ; )
How do you increment without using "+"?
What's the difference to adding ++?
The irony? No doubleplus operator ("++").
"This is a clever usage of the too—little—used plus operator to perform high performance addition"
I'm just perturbed by how many people are describing x++ as equivalent to x+=1
The ++ is probably overloaded, and actually formats your hard disk, instead of incrementing a number.(Just like >> is overloaded to do IO, instead of shifting bits.)
Shouldn't that be += in the third example?