|
|
|
|
|
by spiralhead
6066 days ago
|
|
Fair enough. I just fail to see the distinction between "semicolon insertion" and optional semicolons. Sounds to me like semicolon insertion is just a stupid way to implement an interpreter where semicolons are optional -- something that can be changed without affecting client code |
|
So semicolon insertion is just a hack that happens before parsing. It's not that the semicolons are optional, they aren't, but it puts them in automatically according to a set of rules. Unfortunately that means you can't just put a return on a line by itself -- a semicolon will always be inserted.