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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fd63afa4dc364b7e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-26 06:56:07 PST Path: supernews.google.com!sn-xit-03!supernews.com!freenix!oleane.net!oleane!isdnet!psinet-france!psiuk-f4!psiuk-p4!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Implementing C/C++ style #include... Date: Mon, 26 Mar 2001 09:49:09 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <99nkte$157$1@nh.pace.co.uk> References: <98m938$2iod0$1@ID-25716.news.dfncis.de> <99alrr$itf$1@nh.pace.co.uk> <99d5dj$fi4$1@nh.pace.co.uk> NNTP-Posting-Host: 136.170.200.133 X-Trace: nh.pace.co.uk 985618158 1191 136.170.200.133 (26 Mar 2001 14:49:18 GMT) X-Complaints-To: newsmaster@pace.co.uk NNTP-Posting-Date: 26 Mar 2001 14:49:18 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: supernews.google.com comp.lang.ada:6052 Date: 2001-03-26T14:49:18+00:00 List-Id: I guess I've just seen it done enough different ways that work as well or better that I don't really see any necessity for a preprocessor to do this job. Managing different configurations can be handled with package body substitution, static elimination of code via normal "if" statements, pragma Debug, available configuration management tools, etc. As a result, I think that trying to include special pre-processor directives in the source and going through an extra pre-compilation step (fraught with peril!) is unnecessary and potentially dangerous. (Try looking at some older C code that may have very convoluted "#include" chains, etc. if you need an example of how dangerous this can get.) I've never once seen a case where you could accomplish some goal with a preprocessor that you couldn't accomplish with a less error prone technique. So why ask for the trouble? MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "Anton Gibbs" wrote in message news:K$VNnBA+Jhv6Ewa4@zooks.demon.co.uk... > I agree that Ada is rich enough to do the programming part of systems > development without the need for a pre-processor but my experience is > that a pre-processor can help enormously with configuration management. > For example, to be able to include or exclude specific functionality > according to a set of pre-processor options allowing different variants > of a system to be built whilst retaining the same essential > architecture. We even use this technique to cater for different target > execution environments (compiled using different compilers and, in fact, > different versions of Ada (83 vs. 95)).