this post was submitted on 14 Feb 2024
536 points (96.7% liked)

Programmer Humor

19311 readers
124 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] bleistift2@feddit.de 64 points 7 months ago (34 children)

Whenever the compiler refuses to compile because of an unused var:

Hey Jeff, we know the variable is unused. WE CAN SEE THE SQUIGGLE

[–] RustyNova@lemmy.world 26 points 7 months ago* (last edited 7 months ago) (33 children)

Not a go dev. Is it really preventing compilation or is it just some hardened linting rules? Most languages can prevent compile on those errors if tweaked, but that seems bad if it's not a warning

[–] xmunk@sh.itjust.works 60 points 7 months ago (16 children)

Yes, and it fucking sucks. It's a great thing to lint for but it makes debugging such a pain - commenting out an irrelevant block to focus your debugging will sometimes break your ability to compile... it's extremely jarring.

[–] technojamin@lemmy.world 13 points 7 months ago

This is why many languages have errors and warnings as separate things. Errors for things that for sure prevent the program from working, and warnings for things that are probably wrong but don’t prevent things from working. If you have a setting to then treat warnings as errors (like for CI checks), then you get all the guarantees and none of the frustration.

load more comments (15 replies)
load more comments (31 replies)
load more comments (31 replies)