this post was submitted on 14 Aug 2023
3 points (100.0% liked)

Programmer Humor

19149 readers
1219 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
[โ€“] zorro@lemmy.world 0 points 1 year ago (1 children)

Because that's sane and readable?

[โ€“] r1veRRR@feddit.de 0 points 1 year ago

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).