A question of style

Henry Spencer henry at utzoo.uucp
Sun Nov 26 11:00:42 AEST 1989


In article <1989Nov23.170838.10376 at phri.nyu.edu> roy at phri.nyu.edu (Roy Smith) writes:
>Would you be confused and/or grossed out if you saw:
>	if (something)
>		perror ("message"), exit(1);

I think the correct word is "wary".  My reaction would be "uh-oh -- this
programmer is putting his own convenience and the joys of clever coding
above readability and maintainability -- better treat this code as an
amateur production and not rely on it too much".

If you do perror-and-exit a lot, package it up as a utility function.
If you don't do it much, write it out the normal way.  Your successors
will thank you.
-- 
That's not a joke, that's      |     Henry Spencer at U of Toronto Zoology
NASA.  -Nick Szabo             | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.lang.c mailing list