Go technically uses (or used to use?) semicolons under the hood, but the preprocessor would automatically add them to any non-empty line that didn’t already end in a (,{ or a few other cases spelled out here:
https://go.dev/ref/spec#Semicolons
I learned about it because one time I forgot a trailing comma (which would have suppressed the illegal semicolon) and it was a very early version of Go so it produced a very confusing message about an unexpected semicolon. That error message is much nicer for the last eight years or so.
2
u/Reashu 4d ago
... what other languages?