518
New language (lemmy.world)
submitted 3 months ago by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 25 points 3 months ago

My favourite is "all the boilerplate" then they come up with go's error checking where you repeat the same three lines after every function call so that 60% of your code is the same lines orlf error checking over and over

[-] [email protected] 4 points 3 months ago

Things like lombok make the boilerplate less of an issue in modern Java too

[-] [email protected] 2 points 3 months ago

And god help you if you forget those 3 lines somewhere and you silently have database failures or something else.

[-] [email protected] 2 points 3 months ago

Yeah, that's the other thing - it does become easier to accidentally fail to deal with errors and the go adherents say they do all of that verbose BS to make error handling more robust. I actually like go, but there's so much BS with ignoring the pain points in the language.

[-] [email protected] 1 points 3 months ago

When you handle all your errs the same way, I'd say you're doing something wrong. You can build some pretty strong err trace wrapping errs. I also think it's more readable than the average try catch block.

[-] [email protected] 2 points 3 months ago

You still need to add error handling to every call to every function that might raise an error

this post was submitted on 05 Apr 2024
518 points (94.3% liked)

Programmer Humor

18388 readers
493 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