Functions returning Error codes or actual info

Dan Bernstein brnstnd at kramden.acf.nyu.edu
Wed Sep 12 01:35:43 AEST 1990


In article <3723 at goanna.cs.rmit.oz.au> ok at goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes:
> Functions are _much_ more flexible than returning error codes.

Well, not really; exception handlers can always be implemented with
straight error codes and some ugly syntax. It's just more efficient, and
easier for both the compiler and the programmer to deal with, when the
language supports exceptions as a program construct. (That means more
than Ada's wimpy one-handler-per-function stuff.)

---Dan
``Ada isn't a religion. Ada is a disease.'' HJB



More information about the Comp.lang.c mailing list