Reputation
339
Next privilege 500 Rep.
Access review queues
Badges
3 7
Newest
 Yearling
Impact
~5k people reached

  • 0 posts edited
  • 0 helpful flags
  • 21 votes cast
Nov
13
awarded  Yearling
May
19
awarded  Notable Question
Apr
22
awarded  Scholar
Apr
22
accepted Why are semicolons and commas interchanged in for loops?
Apr
22
awarded  Popular Question
Apr
22
awarded  Good Question
Apr
22
awarded  Nice Question
Apr
21
comment Why are semicolons and commas interchanged in for loops?
So, the philosophy of (, vs ;) is (weaker vs stronger break), rather than (tuple- vs sequence-splitter), right? Still for me it is not obvious whether arguments or statements need stronger breaks (as in many cases for a sequence of statements, breaks are implicit (see e.g. JavaScript (e.g. i++[line break]j++))), but at least now I get the point why the current convention is not "obviously reversed".
Apr
21
comment Why are semicolons and commas interchanged in for loops?
@mattnz The question is about consistency (not "Why we use ; not |?" (or Why do we use 'else' not 'otherwise'?)) which is not case for one language, but a big number of them. An answer that e.g. "it was made in C as a shorthand for while loop (and multiple statements for inc were thought only later), and people didn't want to change it to avoid programmers' irritation" would be perfectly fine.
Apr
21
comment Why are semicolons and commas interchanged in for loops?
I get the difference, just for me ; is natural for a sequence of statements, not necessarily separating any statements (so is it just that tastes differ?). And in the current convention one occasionally ends up with separating sequences of statements with commas anyway...
Apr
21
comment Why are semicolons and commas interchanged in for loops?
@MartijnPieters Great! And thanks. :)
Apr
21
comment Why are semicolons and commas interchanged in for loops?
Sure, I understand that "while" loop is "more fundamental". But such "short-hand notation" does not make much sense (at least to me), as you could start with x = 0; y = 0; and (inside the curly bracket) x++; y++;...
Apr
21
revised Why are semicolons and commas interchanged in for loops?
gram in title
Apr
21
awarded  Editor
Apr
21
awarded  Student
Apr
21
comment Why are semicolons and commas interchanged in for loops?
(My f1rst post here. I am not sure whether this question belongs more to Programmers or SO, so feel free to migrate, if it is needed.)
Apr
21
revised Why are semicolons and commas interchanged in for loops?
gram misc
Apr
21
asked Why are semicolons and commas interchanged in for loops?
Nov
13
awarded  Autobiographer
Nov
13
awarded  Supporter