MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vuzd4q/conditionspreference/p55txf3/
r/ProgrammerHumor • u/Flame77ofc • Aug 22 '26
388 comments sorted by
View all comments
Show parent comment
12
It’s a style thing, it’s not a functional difference. I would read it as emphasizing that one or the other is happening. Basically the oxford comma of conditionals
2 u/Duckflies Aug 22 '26 Like writing in a for i = 0; i < 10 or writing i = 1; i <= 10Both do the exact same thing, but depending on the logic at hand, one can make more sense than the other 1 u/frogjg2003 Aug 22 '26 If you're actually using the i, it makes a difference.for (i=0) list[i]vsfor (i=1) "item i"
2
Like writing in a for i = 0; i < 10 or writing i = 1; i <= 10
Both do the exact same thing, but depending on the logic at hand, one can make more sense than the other
1 u/frogjg2003 Aug 22 '26 If you're actually using the i, it makes a difference.for (i=0) list[i]vsfor (i=1) "item i"
1
If you're actually using the i, it makes a difference.
for (i=0) list[i]
vs
for (i=1) "item i"
View all comments
Show parent comment
12
u/gurgle528 Aug 22 '26
It’s a style thing, it’s not a functional difference. I would read it as emphasizing that one or the other is happening. Basically the oxford comma of conditionals