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,FREEMAIL_FROM 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-23 21:23:07 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!pd7cy1no!pd7cy2so!shaw.ca!border1.nntp.ash.giganews.com!border2.nntp.sjc.giganews.com!border1.nntp.sjc.giganews.com!nntp.giganews.com!local1.nntp.sjc.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 23 Jan 2004 23:23:04 -0600 Date: Sat, 24 Jan 2004 00:23:02 -0500 From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) 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> In-Reply-To: <401115B7.5020205@noplace.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 24.147.77.160 X-Trace: sv3-FGVvnOtc5dnWWfNvqIv/StMQV9psuMcfUHM4zL7+obaTTl6Hn+sqgNFYyUCBM/U/CD+R4nYzvAkMT1K!FK7QEhhuC3lXhjZdDkkse0jnhQO9Rnjx3gZ0Edw6tJHfPBq6Cwjy9xzzC06hVA== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: archiver1.google.com comp.lang.ada:4754 Date: 2004-01-24T00:23:02-05:00 List-Id: Marin David Condic wrote: > Most of what's in System seems to be useful only at run time. By then, I > could have easily solved the problem for myself by having some kind of > app-defined configuration file or similar thing I read in and use to > determine which calls to make. So any solution has to happen at compile > time or it really doesn't do any good. My point was that we can fix System to some extent, since Strings can now be static. Of course there is NO universal solution because on some systems some values will be static, and on others they won't be known until run-time. But if we "fix" System so that the compiler can document such things, then users will be able to do what they can do. 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.) Now it would be nice if I had a compiler that could create a .dll that would use x87, 3dNow!, SSE, SSE2, or possibly now SSE3 code as appropriate. I don't. But assuming I know what I am doing creating the correct .dll is not too painful. (Low-crawling under barbed wire in the mud, rather than crawling over broken glass in freezing rain.) But every once in a while I like to dream about the facility that Ada environments were supposed to have had, where I could just say compile this code for these dozen hardware specifications, and package the result in one load module. ;-) However, back to the world as it exists. The discipline of Ada is that you should be able to push most, if not all, hardware dependencies first into package and other unit bodies, and then into variant parts and if statements. It is hard word to do that. But IMHO it is much easier to maintain than you can ever save during development by not doing the work. So I don't believe in preprocessors for Ada code. There are times that I do get frustrated at the fact that I can put case statements in type declarations and sequences of statements, but I can't wrap a single declaration in one. But usually after a short break, I come back and it wasn't necessary after all. -- Robert I. Eachus "The war on terror is a different kind of war, waged capture by capture, cell by cell, and victory by victory. Our security is assured by our perseverance and by our sure belief in the success of liberty." -- George W. Bush