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

Alex Martelli aleax at aleax.it
Wed Jan 2 17:50:47 CET 2002

"Michael Kelly" <mkelly2002NOSPAM at earthlink.net> wrote in message
news:vbc63u8okomlah7e0m6c5b9th1vh82fsb8 at 4ax.com...
> 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
> >while :-) do a "reasonable" error checking, but are rarely fully thorough
> >with it.  A compromise is needed, because both extremes (no error
> >at all, checking every possible error) are just unbearable in real
> 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.)

Big applications written by people with some smarts start
with the equivalent of:

    global_emergency_ballast = malloc(a_reasonably_big_chunk);

The ballast is released in emergency short-of-memory situations,
exactly to finesse these kinds of issues.


More information about the Python-list mailing list