Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: A question of style
Message-ID: <1989Nov26.000042.2976@utzoo.uucp>
Organization: U of Toronto Zoology
References: <1989Nov23.170838.10376@phri.nyu.edu>
Date: Sun, 26 Nov 89 00:00:42 GMT

In article <1989Nov23.170838.10376@phri.nyu.edu> roy@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@zoo.toronto.edu
