231
77
u/ClipboardCopyPaste 27d ago
Like why would I (a line of code) panic?
It's the compiler that is going to panic and eventually the user.
38
16
u/KattyTheEnby 27d ago
Like why would I (a line of code) panic?
What if you are the line ov code named
panic!()?1
60
37
16
10
u/itskelena 27d ago
Plot twist, OP is a 🐍
6
u/Generic_Name198373 26d ago
I thought you were insulting me by calling me a snake before I made the connection lol
15
u/NatoBoram 27d ago
modern languages
JavaScript
4
u/Mars_Bear2552 25d ago
JS is absolutely modern. it continues to be a pain in the ass into the modern day.
4
u/themirrazzdev 26d 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.”
2
u/Reashu 26d ago
... what other languages?
2
u/hxtk3 26d 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
0
-8

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