Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site harvard.ARPA Path: utzoo!linus!decvax!tektronix!hplabs!hao!seismo!harvard!brownell From: brownell@harvard.ARPA (Dave Brownell) Newsgroups: net.lang.c Subject: Re: expressions and #if Message-ID: <319@harvard.ARPA> Date: Mon, 16-Jul-84 06:45:09 EDT Article-I.D.: harvard.319 Posted: Mon Jul 16 06:45:09 1984 Date-Received: Wed, 18-Jul-84 06:21:12 EDT References: <2104@rlgvax.UUCP> Lines: 27 Contrast smarter and smarter CPP constant evaluation with the approach taken in Ada, which is to insist that the compilers optimize out unreachable code. I frankly prefer this; contrast #ifdef FEATURE if (not_otherwise_indicated()) { /* el hacko gross-me-out */ #endif FEATURE process (); ... #ifdef FEATURE } #endif FEATURE (which I have seen in some System V code, by the way) with code like if (FEATURE == disabled || not_otherwise_indicated()) { process (); } I don't think I'm alone in preferring the second option. In heavily parameterized with #ifdefs or #ifs this seems sooo much more readable ... Thoughts/flames, anyone ??? Dave Brownell {allegra,floyd,ihnp4,seismo}!harvard!brownell