3 ms·
> C has semicolon delimited statements, because imperatively executing statements one after the other is a very common thing to do in C programs. Actually that
by eru 17y ago
> C has semicolon delimited statements, because imperatively executing statements one after the other is a very common thing to do in C programs.
Actually that would be an argument for making newlines delimit statements, like in, say, Python. Instead of requiring extra work by the programmer.
- pyre 17y agoWhy? "imperatively executing statements one after the other" does not imply that they have to be on different lines.
- loup-vaillant 17y agoThey don't have to, but they are, most of the time. Knowing that, "newline as delimiter" yields the lightest syntax.
- eru 17y agoPlus optional semicolons to put some on the same line as in Python.