68
top 6 comments
sorted by: hot top controversial new old
[-] lowleveldata@programming.dev 14 points 1 year ago

Why use goto when you can throw exceptions to escape nested for loops?

[-] fiah@discuss.tchncs.de 6 points 1 year ago

exceptions are just fancy gotos

[-] wvenable@lemmy.ca 1 points 1 year ago

Exceptions are fancy returns. Everything else is fancy goto, including returns...

[-] HairHeel@programming.dev 2 points 1 year ago

I don’t see a catch in the screenshot. Maybe this block just has a finally that cleans some things up before the exception is thrown?

[-] cupcakezealot@lemmy.blahaj.zone 1 points 1 year ago

Why use try/if/catch when you can use try/if/switch/catch?

[-] speaker_hat@lemmy.one 1 points 1 year ago* (last edited 1 year ago)

Why throwing an exception without a message, when you can use 0/0

this post was submitted on 30 Jun 2023
68 points (91.5% liked)

Programmer Humor

32070 readers
465 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS