++ 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.

📉 Falling 0.4x Programming Languages
2,437
Comments
20
Years Active
5
Top Authors
#4851
Topic ID

Activity Over Time

2007
7
2008
18
2009
52
2010
59
2011
109
2012
122
2013
141
2014
139
2015
191
2016
158
2017
148
2018
133
2019
142
2020
170
2021
157
2022
224
2023
153
2024
152
2025
153
2026
9

Keywords

JavaScript IO JS operator increment operators string overloaded js parameters function instead returns

Sample Comments

madcaptenor Feb 23, 2025 View on HN

For example it would not be weird to have ++ instead of +1.

tenthirtyam Jul 31, 2025 View on HN

Shouldn't we programmers be just typing "++"?

Schectmar246 Apr 5, 2021 View on HN

Don't forget that the ++ operator has been added ; )

ColinWright Jul 30, 2012 View on HN

How do you increment without using "+"?

eru Jan 11, 2010 View on HN

What's the difference to adding ++?

jcl Aug 28, 2009 View on HN

The irony? No doubleplus operator ("++").

svieira Sep 29, 2025 View on HN

"This is a clever usage of the too—little—used plus operator to perform high performance addition"

whoopdedo Dec 4, 2015 View on HN

I'm just perturbed by how many people are describing x++ as equivalent to x+=1

eru Mar 17, 2023 View on HN

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.)

baraah Nov 22, 2016 View on HN

Shouldn't that be += in the third example?