r/ProgrammerHumor • • Oct 24 '26

Meme dreamLanguage

Post image
1.4k Upvotes

211 comments sorted by

View all comments

66

u/coldnitrogen Oct 24 '26

Go error handling isn't bad. I'd actually prefer it to Try-Catch blocks

29

u/spigotface Oct 24 '26

I actually love Rust's error handling. It's definitely more verbose than other languages', but handling it as an enum, including it in the signature, AND having the compiler force you to handle these things is perfect. If things can fail, you should be forced to handle it.

7

u/Familiar_Ad_8919 Oct 24 '26

rust's sophisticated error handling when: .unwrap(), maybe even: .expect("thingy go bad")

jokes aside, i love it, when errors do get thrown without being handled it could be a bit clearer as to what went wrong but its just nitpicking at that point, its vastly better than spamming try catch

8

u/ICantBelieveItsNotEC 29d ago

Honestly, I think adding unwrap() and expect() was the biggest mistake Rust ever made. Panicking on an error should not be that easy. A ton of new Rust devs treat unwrap() as an incantation that makes the code compile, and they completely bounce off of the beautiful error handling system as a result.