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-30 04:30:41 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!elnk-pas-nf1!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!newsread1.news.atl.earthlink.net.POSTED!d9c68f36!not-for-mail Message-ID: <401A4E6D.3030406@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 References: <400D2150.6000705@noplace.com> <400E72F9.8060501@noplace.com> <100upo7ln5e3k59@corp.supernews.com> <400FC8E8.2040100@noplace.com> <4011127C.4030801@noplace.com> <101377e54car5cc@corp.supernews.com> <4017AAEF.1020304@noplace.com> <4018FF55.8030800@noplace.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 30 Jan 2004 12:30:41 GMT NNTP-Posting-Host: 209.165.2.58 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.news.atl.earthlink.net 1075465841 209.165.2.58 (Fri, 30 Jan 2004 04:30:41 PST) NNTP-Posting-Date: Fri, 30 Jan 2004 04:30:41 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:5089 Date: 2004-01-30T12:30:41+00:00 List-Id: I don't think I've ever said that it was "bad" to localize dependencies and try to isolate this stuff. Quite the contrary. But if you could scatter system dependencies all over the code or scatter conditional compilation all over the code, why couldn't it be done all over the whole system, just at the file level? Why couldn't a project of 100 files have 50 for one system and 50 for another system and not have anything "localized" in that sense? So my contention is that it can be abused no matter where you push the problem. Often system dependencies are *not* isolated - people write code all the time that works for only one system. Good, bad or somewhere in between - its still done. Offering some kind of conditional compilation doesn't really change that much. That said, I'd be inclined to agree that perhaps the problem could be solved with some portable means of selecting different bodies for a build. Its a reasonable compromise that at least tends to encourage isolation of dependencies at some appropriate level. I don't know that it solves *every* problem, but it probably fixes enough of them that the rest wouldn't matter much. Remember that one of the big strengths of Ada is its assistance on making *portable* code by providing strong *standard* mechanisims for dealing with system dependencies. Everything from specifying numeric accuracy up through tasking is an attempt to say "If the implementation is compliant to the standard, you go compile for the platform and your code will work." Providing a mechanism for dealing with compile-time dependencies is just going down that same path a little further. MDC Jeffrey Carter wrote: > > There's a general SW engineering principle called localization. You > don't lump your code for dealing with a 4-line LCD display in with the > code for dealing with a temperature sensor just because they're both > hardware. Similarly, you shouldn't want your code for doing something > platform dependent on one platform lumped in with your code for another > platform, nor your code for doing things lumped in with your code for > deciding which code to use for this build. > > Separating concerns this way makes everything easier to understand. I > can look at the code for dealing with a VMS file system without having > to understand the code for selecting a VMS file system; I can look at > the code for selecting the file system without having to look at the > code for dealing with file systems. > > That said, it would be nice to have a standard, portable way to select > different bodies for a build, but even without it, the advantages of > separating these independent concerns seem clear. > -- ====================================================================== 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 ======================================================================