Who needs exceptions

Chris Gonnerman chris.gonnerman at newcenturycomputers.net
Sat Dec 29 15:42:54 EST 2001


----- Original Message ----- 
From: "Nils Kassube" <nika at kassube.de>


> gerson.kurz at t-online.de (Gerson Kurz) writes:
> 
> [Error checking without exceptions]
> 
> Okay, now think about how useful your approach is if you call more 
> than one function and there is more than one possible way of things 
> going wrong. Do you really want to maintain error codes this way 
> and give 'em to the function calling your function? 

I've done it more or less that way in C for years, and it sucks.
It's just too easy to ignore some function returns (who checks
fclose()?) in the interest of coding speed.

> > So ? After all, C doesn't need it, and I think few C programmers 
> > would call this feature the "most missing", or? 

I miss exceptions.  I have several C programs, most of which will
probably never be rewritten, and debugging changes in them is often
a pain.

Mind you, I've been doing C for a long time, longer than many on
this list.  I have learned discipline the hard way.  The thing is,
exception handling as a base language feature protects newer
programmers until they have time to learn that discipline.

It also makes more experienced programmers more productive, even if 
they never use it (IMHO) as errors below the level of the program 
being written never go unhandled *and* unreported, as in C.

> C and programmers who like C should die a slow and painful death 
> for holding back the computer industry for two decades.

OUCH.  Like, I hate Ada, but I'd never say anything so terrible
about Ada programmers (Visual Basic might be an exception, though...)






More information about the Python-list mailing list