Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!husc6!harvard!cmcl2!philabs!pwa-b!mmintl!franka From: franka@mmintl.UUCP (Frank Adams) Newsgroups: net.lang.c,net.lang.pascal Subject: Variable names Message-ID: <1679@mmintl.UUCP> Date: Mon, 28-Jul-86 20:26:43 EDT Article-I.D.: mmintl.1679 Posted: Mon Jul 28 20:26:43 1986 Date-Received: Thu, 31-Jul-86 21:25:05 EDT References: <2222@brl-smoke.ARPA> <7014@boring.mcvax.UUCP> <3130@utcsri.UUCP> <2248@ihlpg.UUCP> Reply-To: franka@mmintl.UUCP (Frank Adams) Organization: Multimate International, E. Hartford, CT Lines: 15 Xref: mnetor net.lang.c:5506 net.lang.pascal:353 In article <2248@ihlpg.UUCP> tainter@ihlpg.UUCP writes: > notfound : boolean; Some programming advice, free for the asking and worth every penny: *never* use negative names (like notfound) for boolean variables. It may save you a boolean complement in an if statement or two, but it's confusing. If somebody comes along later and makes a change which requires the complementary condition in an expression, it gets *really* confusing. The savings in the if statement is ephemeral anyhow; any decent compiler will generate equivalent code on most architectures (and those where there is a real difference in the ease of "branch on true" vs "branch on false" are as likely to favor one as the other). Frank Adams ihnp4!philabs!pwa-b!mmintl!franka Multimate International 52 Oakland Ave North E. Hartford, CT 06108