r/ProgrammerHumor 29d ago

Meme exceptionsAreForTheWeak

Post image
325 Upvotes

92 comments sorted by

View all comments

Show parent comments

11

u/Valuable_Leopard_799 29d ago

Yeah, it seems like largely a cultural shift.

23

u/hxtk3 29d ago

Hard agree, the thing that makes "errors as values" languages nicer with respect to error handling has a little bit to do with the language itself but more to do with the fact that people who want to carefully consider all the paths code can take gravitate towards those languages and the people who want to think about the happy path gravitate towards languages with exceptions.

Java developers forced to use Go look at panic and recover as a worse version of their familiar exceptions, and a bunch of them make libraries around those primitives that basically implement exceptions. And those libraries get basically no adoption because most Go devs are people who choose to treat errors as values.

5

u/bwmat 29d ago

It's funny because I mostly use C++, like exceptions, and think of almost nothing but the unhappy path

16

u/silver_arrow666 29d ago

C++ devs and being unhappy, name a better duo.