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-20 10:50:07 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Standard Ada Preprocessor Date: Tue, 20 Jan 2004 18:50:04 +0000 (UTC) Organization: GMUGHDU Message-ID: References: <400A9B48.3060100@noplace.com> <400BD4B5.6000307@noplace.com> <400BDB7C.40100@noplace.com> <400D2150.6000705@noplace.com> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1074624604 21621 134.91.1.34 (20 Jan 2004 18:50:04 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Tue, 20 Jan 2004 18:50:04 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: archiver1.google.com comp.lang.ada:4580 Date: 2004-01-20T18:50:04+00:00 List-Id: Warren W. Gay VE3WWG wrote: : Portability of course is an important issue. This becomes even more : important to Open Sourced projects, since they must be easy to : compile and maintain for all/most flavours of UNIX, and different : Windows environments (native and/or CYGWIN etc.) "native and/or CYGWIN" is a distinction that IMO amounts to saying "not portable and/or portable", at least for your average C command line tool or X11 program. How would you compile a Unix program not using one of the Unix libraries/services provided with or for Windows? No preprocessor can help here, unless it magically provides a mapping from a cooperating sequence of API calls found in the Unix world to a cooperating sequence of APIs calls found in the Windows world. Or are you saying that Ada code shoud use #ifs all over the place, neglecting language features? IMHO, a program is portable if it uses *abstraction*, for example a good separation a la MVC. Abstraction is more easily expressed in a Ada than in CYGWIN's perceived "standard" language, I think. A program is not portable in this sense if it is a Unix command line tool and happens to run on top of a Unix layer, or if it is an X11 program and runs in the presence of an X server that has been ported to Windows. : Failing that, everyone must bake their own solution to this : problem. Many maintain that by centralizing problem code into : separate libraries works well enough. But this does not help : in the cases where a product can be compiled with different : options turned on or not (say from a Makefile). How could #ifs or text substitutions make any difference? If the maintenance has to happen in my head so to speak, that is if I have to know which #if surround what specialisation, I'd rather stay with my language and use what is provided for expressing a difference in a type's components say. Example struct _gna { int x; int y; #if defined(__S1__) int z; #else short z; #endif } *S; I don't see the advantage, even if the distinction appears "centralised" (?). : In other cases, : it may mean enhancements involve maintenance of several parallel : modules, instead of one centralized location. Why not use language means to check modules for compliance with the common requirements? "display help on topic_abc_123 in a dialogue window" could well be mapped to an abstract operation. -- Georg