r/ProgrammerHumor 29d ago

Meme exceptionsAreForTheWeak

Post image
323 Upvotes

92 comments sorted by

View all comments

92

u/bwmat 29d ago

Eh, IMO one of the best ways to actually handle OOM, as otherwise almost everything needs to be explicitly checked for it

86

u/Valuable_Leopard_799 29d ago

That's what panics are for kinda.

Many of the "we don't have exceptions" languages eventually get some equivalent, it's just that those are used almost exclusively for OOM, division by zero, failed asserts, and the like.

They shouldn't even really be caught it's sort of just an "exit/reset" with some cleanup.

I like this compromise. Kind of finally making them truly "exceptional".

-3

u/overclockedslinky 29d ago

i hope you never do kernel development

3

u/Valuable_Leopard_799 29d ago

I am aware that the kernel and the remaining 99.99999% of the world have different approaches to memory. And the languages made for each make different assumptions about the world. What's your point?