@adamnash
Adam Nash
1 year
@tunguz No love for ++i?
31
18
1K

Replies

@tunguz
Bojan Tunguz
1 year
There are three types of people: 1) i++ 2) i+=1 3) i=i+1
1K
2K
21K
@tunguz
Bojan Tunguz
1 year
@adamnash Those are religious extremists.
24
30
3K
@ernani_eth
Ernani | Orium
1 year
@adamnash @tunguz ++i is to sophisticated for most people
0
0
1
@alexiskold
Alex Iskold | 2048.vc
1 year
@adamnash @tunguz Living on the edge!
0
0
0
@Star_Knight12
Prasenjit
1 year
@adamnash I was going to comment it.
0
0
0
@adamnash
Adam Nash
1 year
2
0
2
@gorilla_worf
gorrila worf
1 year
@adamnash @tunguz Stroustrup jokes that he prefers pre-increment, too - โ€œwith the proper nomenclature itโ€™s ++Cโ€
0
0
3
@buffvorpington
buff vorpington
1 year
@adamnash @tunguz I don't write code that is dependent on the order of pre/post-increment. There were a few times where I swear it wasn't behaving as expected, and I broke my logic and arithmetic into separate lines. Probably I was making some other error, still can't bring myself to do it.
2
0
2
@tjsr
Tim Rowe
1 year
@adamnash @tunguz These four operations do different things. You should use the one appropriate for the situation rather than just blindly always using a favourite.
0
0
2
@0din_______
Odin๐Ÿ‡ต๐Ÿ‡ธ๐Ÿ‰๐Ÿณ๏ธโ€๐ŸŒˆ๐Ÿ”ป
1 year
@adamnash @tunguz No, cause then often u would end up scratching ur head where th extra loop coming from
1
0
0
@yugene_says
Yugene Says
1 year
@adamnash @tunguz Who even uses ++i?
1
0
0
@Router010906
ใƒซใƒผใ‚ฟ
1 year
@adamnash @tunguz If โ€œiโ€ is a C++ object with the overload operator โ€œType& operator++();โ€, ++i can be faster than i ++ because it return the current value quote and the i++ return the value of i before inc, so i++ need to copy the value before inc. Thatโ€™s why I love ++i
0
0
1
@DuffyDack96
DaffyDuck
1 year
0
0
0
@DomineurInc
domineur Inc. ๐Ÿ‡จ๐Ÿ‡ฆ
1 year
@adamnash @tunguz It is odd that no one does that
0
0
0
0
0
0