(no title)
ameliaquining | 7 days ago
The two systems have in common that you can either include or omit a semicolon when you've got a simple statement on its own line, but under the hood they're different; the missing semicolon at the end of a line in idiomatic Python is not "automatically inserted by the parser", it is simply not needed at all. There are also behavioral differences; for example, in Go and JavaScript a semicolon on a line by itself is legal and does nothing, while in Python it's a syntax error.
gingerBill|7 days ago
Those "newline tokens" are effectively the equivalent to a semicolon in the parser. They are statement terminators. The way that Odin or Python handles them is effectively the same except when I tokenize the newlines, they are treated as semicolons but with the "text" being "\n". Thus the distinction here is a matter of what you call it, not how it is treated.
That is the same as a form of "automatic statement-terminator insertion" where that statement-terminator is whatever you want it to be. And to me, that is as form of "semicolon" (which is being used as a generalization for statement-terminator) insertion.