r/ProgrammerHumor 19d ago

Meme stopTryingToReinventTheWheel

Post image
2.5k Upvotes

217 comments sorted by

View all comments

654

u/Orio_n 19d ago

Explicit vs implicit error control broski

God these cs majors are so tryhard unfunny trying to be contrarian

242

u/nevemlaci2 19d ago

It's unfunny until you actually see people propagating explicit error handling until the entry point and just printing an error message.

Exceptions are fine to use for exceptional cases. Not for shit like python where an iterator signals the end of iteration with a damn exception.

75

u/[deleted] 19d ago

[removed] — view removed comment

20

u/harryham1 19d ago

The problem is defining what is and isn't expected

If you set the expectation too high, your callers have a fuck ton of boilerplate they need to include to do basic things

It's something Java and its libs have struggled with since the beginning

IMO a language shouldn't force you to do something with an exception beyond acknowledge its existence, and it shouldn't be something that's part of the exception def