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-23 09:39:13 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!nx02.iad01.newshosting.com!news-feed01.roc.ny.frontiernet.net!nntp.frontiernet.net!tdsnet-transit!newspeer.tds.net!cyclone.bc.net!news.uunet.ca!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail From: "Warren W. Gay VE3WWG" 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> In-Reply-To: <_JSdna166JuxFo3dRVn-hg@comcast.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Fri, 23 Jan 2004 12:24:51 -0500 NNTP-Posting-Host: 198.96.223.163 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1074878639 198.96.223.163 (Fri, 23 Jan 2004 12:23:59 EST) NNTP-Posting-Date: Fri, 23 Jan 2004 12:23:59 EST Organization: Bell Sympatico Xref: archiver1.google.com comp.lang.ada:4726 Date: 2004-01-23T12:24:51-05:00 List-Id: Robert I. Eachus wrote: > Marin David Condic wrote: > >> How about *adding* something to system like: >> >> System.Compiler_ID : constant String := "Something Useful Here" ; >> >> This would not break anything that was already using System_Name >> (although given its general uselessness, I doubt that is very much) >> and would provide a mechanism for identifying the compiler that is >> doing the job. Then statements like "if (Compiler_ID = "Something") >> then..." would possibly be useful. > > In Ada 83 that wouldn't have worked. But I think it would be wonderful > to get rid of the type Name in system and add three string constants: > > Operating_System: constant String := implementation_dependent; > Hardware_Architecture: constant String := implementation_dependent; > Compiler: constant String := implementation_dependent; > Version: constant String := implementation_dependent; This is still a very limited solution to the problems where conditional compilation is needed. MDC pointed out a good example where conditional "with" is desirable (and of course this affects coresponding code). These items only deal with system and compiler level issues. How do you solve the issues involved with different curses libraries? - UNIX/*BSD curses library? - GNU/Linux curses library? - PDcurses? If you're writing a curses binding, you not only need to know which of these you're binding to, you need some serious interface changes within your Ada code to be successful (changes to API calls, conventions etc.) Some of the pragmas you will use, will also be conditional upon what platform and "library" you're interfacing with. Even where interfaces are identical, you often have to work around bugs or implementation limitations. The current "Ada compile process" does not solve this issue. So I would suggest that the lack of "conditional compilation" capability in Ada holds it back from general use. If you don't want preprocessing, then fine. Engineer a "conditional compile" capability, and leave the "how" as an implementation detail. -- Warren W. Gay VE3WWG http://ve3wwg.tk