Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!husc6!cmcl2!brl-adm!adm!DHowell.ElSegundo@Xerox.COM From: DHowell.ElSegundo@Xerox.COM Newsgroups: comp.lang.c Subject: Re: Writing readable code Message-ID: <8631@brl-adm.ARPA> Date: Mon, 3-Aug-87 20:28:42 EDT Article-I.D.: brl-adm.8631 Posted: Mon Aug 3 20:28:42 1987 Date-Received: Tue, 4-Aug-87 06:17:53 EDT Sender: news@brl-adm.ARPA Lines: 15 In article <525@murphy.UUCP>, Dave Cornutt writes, >...any halfway decent compiler should be able to >recognize that "if (p)" and "if (p == NULL)" are the same and generate >the same code. I'd hope that any decent compiler would recognize that they are completely opposite. The fact that it easy to make the above mistake is precisely the reason why one of these constructs is not clear. I leave it as an exercise to the reader to decide which one. Dan DISCLAIMER: The opinions expressed above may not be anyone's opinions at all, but the random output of a bunch of monkeys on computer terminals.