Semicolons as statement terminator (or separator) are at least as old as Algol-60; C merely inherited that.
Re:Vala Programming Language
by adhesive_wombat on Saturday July 16, 2022 @08:44AM
(#32117475)
Periods are in struct.member identifiers and also in floating points. Using them again for end of statement would be complicated[1].
Imagine that your statements are "x = y.x = z." The compiler needs to figure out if that middle dot is saying "x member of y" or if it's a statement terminator.
[1]: It's already complicated by that reuse, which is, I assume, why identifiers can't start with digits so your parser can be simpler.
I assume that the statement terminator was chosen first, so they could've used something else for member access, such as `\`. Though I don't know about floats.
They could have used a comma for floats, as is common in many non-English-speaking countries. Although I guess that might become ambiguous with its use as a parameter separator.
Smalltalk uses periods. One thing I like about C is that I can write .1 or 1. , but most languages these days force me to add the zero: 0.1 or 1.0 .
But did he explain why it used semicolons, rather than periods, which would make more sense because a statement is basically a sentence?