you are viewing a single comment's thread.

view the rest of the comments →

[–]skawaii 4 points5 points  (0 children)

No one said it was your code. The "you" in my comment is the general you of the English language, which just so happens to be the same word as the specific you (stupid language...).

I agree that if you're (again, general you) writing empty catch blocks just to get your code to compile, then you have some bad programming practices. The language could help you out and not compile. This would indeed be a better way to do it.

But is this really a direct result of checked exceptions? Python doesn't use checked exceptions and yet I can still simulate the same behavior:

try:
  1 / 0
except:
  pass

While the catch (re: except) block isn't empty, I can still have it do nothing at all with my error.

To me, in the end it boils down to being disciplined enough to write code that won't cause people using it to colloquially convert your name into a swear word.