[Q] Are Exceptions used that much in practice?
Erik Max Francis
max at alcyone.com
Tue Dec 12 17:59:22 CET 2000
Jerome Mrozak wrote:
> I realize that Python allows me to catch exceptions. But being a
> I'm not sure if they are used much in the 'real world'.
> Another way of putting it is, if the try-catch-else didn't exist would
> anyone be terribly put out? (If not then the construct isn't much
Yes. Yes. Yes.
Anyone who has done substantial programming in Python, Java, or C++ has
used exceptions extensively. If you haven't found a significant use for
exceptions, then you're either writing extremely trivial programs (ones
so trivial they cannot fail, which has to be _really_ trivial) or you're
not handling error conditions properly. Truth be told, handling
arbitrary error conditions properly is one of the more difficult things
to do in computer science. Exceptions, although they require a
significant change in the way you write code, make this a lot easier.
Draft Standard C++ programming without exceptions was obnoxious.
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/ \ Love is not love which alters when it alteration finds
\__/ William Shakespeare, _Sonnets_, 116
Alcyone Systems' CatCam / http://www.catcam.com/
What do your pets do all day while you're at work? Find out.
More information about the Python-list