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:44:39 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: <401268B4.1010704@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:44:38 GMT NNTP-Posting-Host: 209.165.23.2 X-Complaints-To: abuse@earthlink.net X-Trace: newsread3.news.atl.earthlink.net 1074948278 209.165.23.2 (Sat, 24 Jan 2004 04:44:38 PST) NNTP-Posting-Date: Sat, 24 Jan 2004 04:44:38 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:4767 Date: 2004-01-24T12:44:38+00:00 List-Id: O.K. Can you think of *some* way for the *language* to specify redirection to an alternate body? That might fix most problems - if not all. (What do I do if I want alternative declarations in a spec to account for compiler differences?) I suppose if we had some kind of "conditional with" we could construct a few more layers of indirection and provide alternate implementations that are picked up by the compiler. Some version of: with if (condition) Gnat_Solution ; with if (condition) Aonix_Solution ; and assuming that Gnat_Solution and Aonix_Solution have an identical interface (just different bodies) a similar "conditional use" in the right context would let you connect to the right thing. (They might not need identical interfaces - you might allow for differences in declarations so long as all the right identifiers were visible.) So then if you had a compiler specific package or some platform dependent thing, you'd hide it under some "skin" that provided a common interface. Withing and using the right "skin" would give you a portable way of handling the building of a system for two or more targets. (Assuming that the compiler didn't need to compile something conditionally withed just to be able to ignore the with.) MDC Pascal Obry wrote: > > I'm not sure I agree with that. Of course it will be a working solution but > this is not a solution I'd like to see all over the place. Such feature will > just encourage people to create messy code! > > I still prefer the one-spec and multiple bodies solution. At least the spec is > target/hardware independent. This means that a good design needs to be > done. Once this is done the selection of the right body depending on the > target/hardware is a matter of configuration management. > > The argument saying that this solution make too much code duplication is > wrong. It is perfectly possible to use child package/procedure/function for > the one routine that is target/hardware dependant in whole API. > > Pascal. > -- ====================================================================== 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 ======================================================================