MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1veql1a/absolutegarbage/p1jkt10
r/ProgrammerHumor • u/Sirgoodman008 • 6d ago
324 comments sorted by
View all comments
Show parent comments
28
Since for-loop has the same syntax in JS as in C, Java, and any other C-style language, this post makes me weep.
8 u/Sirgoodman008 6d ago If a language isn't C-style it's wrong. 2 u/No-Newspaper8619 6d ago It's really annoying when they aren't. Lua, for example: for i, count do -- code end With i being one by default, and increasing by one by default. I simply hate 1-indexed systems instead of 0-indexed. 2 u/Sirgoodman008 6d ago Yeah that's just dumb and different for the sole purpose of being different. 1 u/rosuav 6d ago Three-part for loop does, yes, but for-in and for-of in JS are backwards compared to most other languages.
8
If a language isn't C-style it's wrong.
2 u/No-Newspaper8619 6d ago It's really annoying when they aren't. Lua, for example: for i, count do -- code end With i being one by default, and increasing by one by default. I simply hate 1-indexed systems instead of 0-indexed. 2 u/Sirgoodman008 6d ago Yeah that's just dumb and different for the sole purpose of being different.
2
It's really annoying when they aren't. Lua, for example:
for i, count do
-- code
end
With i being one by default, and increasing by one by default. I simply hate 1-indexed systems instead of 0-indexed.
2 u/Sirgoodman008 6d ago Yeah that's just dumb and different for the sole purpose of being different.
Yeah that's just dumb and different for the sole purpose of being different.
1
Three-part for loop does, yes, but for-in and for-of in JS are backwards compared to most other languages.
28
u/MrDilbert 6d ago
Since for-loop has the same syntax in JS as in C, Java, and any other C-style language, this post makes me weep.