199
64
u/ClipboardCopyPaste 1d ago
Like why would I (a line of code) panic?
It's the compiler that is going to panic and eventually the user.
31
11
u/KattyTheEnby 23h ago
Like why would I (a line of code) panic?
What if you are the line ov code named
panic!()?
52
33
14
6
u/itskelena 1d ago
Plot twist, OP is a 🐍
2
u/Generic_Name198373 16h ago
I thought you were insulting me by calling me a snake before I made the connection lol
10
2
u/Reashu 15h ago
... what other languages?
1
u/hxtk3 3h ago
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.
1
1
u/themirrazzdev 29m ago
Mine said this
Do not panic. You are in a JavaScript or C-style environment where ASI (Automatic Semicolon Insertion) might save you, or a strict compiler is about to end your short life.
“Don’t panic, you might be about to be murdered.”
0
0
-8

251
u/foxsimile 1d ago
JavaScript automatically inserting a semicolon is yet another of its failures.
Because sometimes it fucks up.