Path: utzoo!mnetor!uunet!mcvax!guido From: guido@cwi.nl (Guido van Rossum) Newsgroups: comp.lang.c++ Subject: Re: C++ releases from AT&T? Message-ID: <257@piring.cwi.nl> Date: 31 Mar 88 08:52:29 GMT References: <254@piring.cwi.nl> <1517@dataio.Data-IO.COM> Reply-To: guido@cwi.nl (Guido van Rossum) Organization: The Royal Society for Prevention of Cruelty to Amoebae Lines: 37 I wrote: I also believe this is an implementation issue, not a language issue. This is the crux. I want it to be a language issue, so I can replace 90% of the occurrences of #ifdef DEBUG printf("We did it!!!!!!!!!!\n"); #endif by if (debug) printf("Did it...\n"); which is much less disturbing for the reader of the code. It can be controlled by a variable or a constant, e.g.: #ifdef NDEBUG const debug = 0; #else int debug; /* Set by -D command line flag */ #endif However, I need some reassurance that turning on NDEBUG will actually remove all these debug lines from my code. A wording similar to that used for the descriuption of 'inline' would be fine: the intention is clear, and compiler writers should attempt to honor it if reasonably possible. -- Guido van Rossum, Centre for Mathematics and Computer Science (CWI), Amsterdam guido@cwi.nl or mcvax!guido or (from ARPAnet) guido%cwi.nl@uunet.uu.net