From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f34f1a1939dc0c40 X-Google-Attributes: gid103376,public From: Ted Dennison Subject: Re: conditional compilation Date: 2000/08/01 Message-ID: <8m6log$r3a$1@nnrp1.deja.com>#1/1 X-Deja-AN: 653201836 References: <87d7jvp3qq.fsf@chiark.greenend.org.uk> <39857E5F.33C40014@acm.com> <3985FB16.82D140BB@below.for.email.address> X-Http-Proxy: 1.0 x71.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Tue Aug 01 14:10:30 2000 GMT X-MyDeja-Info: XMYDJUIDtedennison Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.7 [en] (WinNT; I) Date: 2000-08-01T00:00:00+00:00 List-Id: In article <3985FB16.82D140BB@below.for.email.address>, Simon Brady wrote: > From my own (small-scale) experience I like what conditional > compilation can achieve, especially the way it allows debug builds > loaded up with paranoic self-test code.I would certainly like to see > a standardised, portable method of achieving such ends in Ada - > however, the question of (a) whether conditional compilation is the > way to do it and (b) whether support belongs in or out of the language > seems to be very much open. I'd be curious to hear what people with of > larger-scale experience think this. I've often had to figure out someone else's large C program that was chock full of target-dependent #ifdef's. Its a *nightmare*. Often times you have to dig deep into the bowels of an even more complicated makefile to even figure out which conditional branches your compilation is using. I suspect the people who specified the orignial Ada requirements had similar experiences, as support for C-like conditional compilation was explicitly forbidden. The Ada approach is supposed to be that you have different source files for different targets, and use your build tools to choose between them. >From a maintanence standpoint I like that idea a whole lot better. But it requires that the program be organized ahead of time for this purpose. Developers aren't used to having to think about these issues before they start coding. So most of the time the need for the new target appears after the code is already complete. Then it annoys people that they have to redesign all their code, rather than just graft on the new target like they could with C. -- T.E.D. http://www.telepath.com/~dennison/Ted/TED.html Sent via Deja.com http://www.deja.com/ Before you buy.