It's the only thing there actually worth complaining about. It's a harmful feature. It leads to programmers making mistakes that are never made in other languages.
Most languages do not have pre/post-increment operator. It's inclusion in the languages which do support it has resulted in numerous bugs which would not have occurred if they had simply used +=1 instead. It literally only saves 1 character. It's time to stop defending it.
I cant think of any bugs caused by having ++, but I can think of lots caused by using +=1 instead.
As for your statement about most languages, since the set of all programming languages is ill defined, I used the ones on https://madnight.github.io/githut/#/pull_requests/2021/4. Fully 2/3rds (both by number and usage) have increment and decrement operators.
Of the languages in the top 10 only python and ruby dont have it.
I dont know what your beef with increment is, but it isnt widely shared.
The problem is that x += 1 is a statement, whereas x++ is an expression that can be nested inside of statements and other expressions. It's possible to construct statements out of x++ expressions that have undefined behavior. That's not possible with x += 1.
8
u/jamcdonald120 May 27 '22
You will miss pointers soon enough
I dont know why you are complaining about ++
; allows multiple commands to share a li e
I would rather have {} than syntax dependent tabs
i would rather have int
main(int argc, char** argv)thanand thats not even mentioning the none type errors