Who needs exceptions (was Re: Two languages, too similar, competing in the same space.)

Michael Kelly mkelly2002NOSPAM at earthlink.net
Wed Jan 2 11:17:40 EST 2002


On 02 Jan 2002 09:11:55 -0500, pinard at iro.umontreal.ca (François
Pinard) wrote:

>My feeling is that C programmers (and I still work at C programs once in a
>while :-) do a "reasonable" error checking, but are rarely fully thorough
>with it.  A compromise is needed, because both extremes (no error checking
>at all, checking every possible error) are just unbearable in real programs.

There was an interesting article in one of the programmer
magazines(maybe C/C++ User Journal but I don't recall)
about how doing error checking for memory allocations
was pretty much a waste of time and effort(since usually
if you are that short of resources you can't do anything
to recover anyway.)

Also in languages with built-in garbage collection
you take it for granted but with do it yourself
memory management like in C++ it would really
be tedious to deallocate all resources manually
in every error checking block of code.  The
exception handling calls the destructors of
local objects automagically.

Where it can get weird though is in VC++ where
you have like 3 flavors of exception handling
that don't play well together. :)


Mike

--

"I don't want to belong to any club that would have me as a member."
    -- Groucho Marx



More information about the Python-list mailing list