Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • 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". Commented Apr 21, 2013 at 23:39
  • @PiotrMigdal the comma as a delimiter would prevent the use of the comma operand and might imply the components of the for loop are statements rather than expressions. This has significant implications. Commented Apr 22, 2013 at 0:04
  • The last comment made me curious what BCPL did, but apparently there it was FOR i = e1 TO e2 BY e3 DO c (e1..e3 expressions, c command), which more closely resembles BASIC's syntax. Source Commented Apr 22, 2013 at 7:41
  • 1
    @PiotrMigdal - The "philosophy" is whatever K&R and the rest were thinking back in 1970. I don't think it went to the depth of thinking that you imagine. (They were trying to implement a "higher level" language to avoid having to write masses of telephone switch software in assembler.) Commented Apr 22, 2013 at 7:46
  • I just checked; the for syntax was introduced in C (it wasn't in B or BCPL). Commented Apr 22, 2013 at 10:16