this post was submitted on 02 Oct 2023
1101 points (98.8% liked)

Programmer Humor

37339 readers
474 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 6 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Cwilliams@beehaw.org 7 points 2 years ago* (last edited 2 years ago) (2 children)

When I forget a semicolon (in languages that like those), it gives the the error on the next line instead of the one that I forgot the semicolon on. It makes sense once you think about it but, man, it trips me up sometimes

[–] Knusper@feddit.de 6 points 2 years ago* (last edited 2 years ago) (2 children)

Definitely also depends on the language. Here's e.g. Rust, the goddamn overachiever, pointing arrows and everything:

Often feels like, if you know where it needs to go, why ask me?

[–] GamesRevolution@programming.dev 1 points 2 years ago (1 children)

Doesn't rust-analyser have the code suggestions that do fix it for you? It's not fixing automatically, but it does know where it needs to go and it's giving you a button that you click and it automatically fixes it

[–] Knusper@feddit.de 3 points 2 years ago

Oh yeah, it does. I'm not really complaining about fixing it myself. Mostly, I was joking that I felt like I'm unneeded. Rust-analyzer actually being able to fix it on its own, doesn't help in that sense either. 🙃

[–] Cube6392@beehaw.org 1 points 2 years ago (1 children)

I assumed we weren't talking "expected semicolon" since that ones pretty explanatory and would never appear on a blank line. That said, it does provide an opportunity to talk about the worst code style I ever saw. A dude decided he wanted semicolons at the start of lines so that compiler error always mapped to the line he would have put the semicolon on

[–] Cwilliams@beehaw.org 1 points 2 years ago

At least there's at least some benefit there :P