this post was submitted on 13 Nov 2024
188 points (98.5% liked)

Programmer Humor

32533 readers
551 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 4 points 1 week ago (1 children)

I suppose it depends on the language? For the most part I think you're right. Exceptions are only used (if at all) in situations where a program diverges unexpectedly from its normal flow. But take a language like Python. They're just everywhere. Even your plain old for loop ends on an exception, and that's just business as usual.

[โ€“] [email protected] 2 points 2 days ago

Python programmers appear to actively promote the 'easier to ask forgiveness, than permission' style nowadays. This article has a measured take: https://realpython.com/python-lbyl-vs-eafp/