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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38159b1b5557a2e7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-24 04:28:33 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!elnk-pas-nf1!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!newsread3.news.atl.earthlink.net.POSTED!d9c68f36!not-for-mail Message-ID: <401264ED.306@noplace.com> From: Marin David Condic User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (OEM-HPQ-PRS1C03) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Standard Ada Preprocessor (Was: why ada is so unpopular ?) References: <49cbf610.0401170627.79c3dfe5@posting.google.com> <400A9B48.3060100@noplace.com> <400BD4B5.6000307@noplace.com> <400BDB7C.40100@noplace.com> <400D2150.6000705@noplace.com> <400E72F9.8060501@noplace.com> <100upo7ln5e3k59@corp.supernews.com> <400FC8E8.2040100@noplace.com> <_JSdna166JuxFo3dRVn-hg@comcast.com> <401115B7.5020205@noplace.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 24 Jan 2004 12:28:32 GMT NNTP-Posting-Host: 209.165.23.2 X-Complaints-To: abuse@earthlink.net X-Trace: newsread3.news.atl.earthlink.net 1074947312 209.165.23.2 (Sat, 24 Jan 2004 04:28:32 PST) NNTP-Posting-Date: Sat, 24 Jan 2004 04:28:32 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:4766 Date: 2004-01-24T12:28:32+00:00 List-Id: Well, there are things that happen at compile time. Perhaps in theory they don't *have* to happen at compile time - but in the world we live in and for the forseeable future, things are going to be done at compile time. Since different compilers often support (or don't support) different declarations, I'd like some way of saying "If I'm on Gnat - compile this declaration - if on Aonix, make this the declaration...". I don't know how that can happen at runtime. Likewise, when withing packages that may be compiler dependent and using statements from them, I'd like some way of doing that and I can't imagine how a procedure call of something that doesn't get withed is going to sneak past the compiler and get resolved at runtime. Like I've said elsewhere, perhaps you can handle this through various CM and build processes, but often this is harder to manage or it has pitfalls organizationally and it doesn't provide a *portable* answer that I know I can count on in some other environment. Sure, you can create yet one more layer of indirection and hide all that stuff under a "portable" interface (and you probably should, even if you had conditional compilation) but you've just pushed the problem off one level. You've got two separate bodies of code that have to be tracked and managed and maintained and you don't necessarily have the tools to do that easily, nor is it guaranteed to work if you've got to drag it to an as yet to be specified environment. Conditional compilation is not necessarily pretty, but the whole mess of trying to maintain a variety of different targets never is under the best of circumstances. Conditional compilation would at least provide a portable answer. MDC Robert I. Eachus wrote: > > I certainly don't buy the "conditional compilation must happen at > compile time" argument. It may be true in most embedded applications > that you can statically know these things at compile time. But I also > deal with creating .dlls that must match the current hardware. If that > means that I have to generate self-modifying code, so be it. (In > practice I build and install the correct dispatch table when > initializing a .dll.) -- ====================================================================== Marin David Condic I work for: http://www.belcan.com/ My project is: http://www.jsf.mil/NSFrames.htm Send Replies To: m o d c @ a m o g c n i c . r "Face it ladies, its not the dress that makes you look fat. Its the FAT that makes you look fat." -- Al Bundy ======================================================================