this post was submitted on 14 Aug 2023
1429 points (98.0% liked)

Programmer Humor

25425 readers
1419 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 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] fkn@lemmy.world 49 points 2 years ago (9 children)

Also Go: exceptions aren't real, you declare and handle every error at every level or declare that you might return that error because go fuck yourself.

[–] zorro@lemmy.world 53 points 2 years ago (8 children)

Because that's sane and readable?

[–] r1veRRR@feddit.de 20 points 2 years ago (1 children)

It's better than "invisible" exceptions, but it's still the worst "better" version. The best solution is some version of the good old Result monad. Rust has the BEST error handling (at least in the languages i know). You must handle Errors, BUT they are just values, AND there's a easy, non-verbose way of passing on the error (the ? operator).

[–] theneverfox@pawb.social 1 points 2 years ago* (last edited 2 years ago)

Beyond a quick "hello world" when it came out, I've never used rust, but that sounds pretty great

load more comments (6 replies)
load more comments (6 replies)