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 21:34:47 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Standard Ada Preprocessor Date: Fri, 23 Jan 2004 23:33:53 -0600 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <10140vm4dkkr9b3@corp.supernews.com> References: <400BDB7C.40100@noplace.com> <400D2150.6000705@noplace.com> <400E72F9.8060501@noplace.com> <400FD4F7.8050805@noplace.com> <4011CF46.3040001@noplace.com> X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:4755 Date: 2004-01-23T23:33:53-06:00 List-Id: "Marin David Condic" wrote in message news:4011CF46.3040001@noplace.com... ... > I've encountered all of these in real-world situations and sometimes I > might have dealt with them by having separate bodies (often really > difficult to manage in practice) or I dealt with them via conditional > compilation because I was using C. I just know it happens enough where > conditional compilation would be a useful thing and not always a matter > of abuse. If someone thinks it isn't really needed because it can be > dealt with via some kind of CM or build process - I'd suggest they need > to work in some of the environments I've been in where you either don't > have the tools or there are all sorts of complications that make this > really hard to do. You want to change the language because you've had to work in poorly managed shops with insufficient tools? Sure, we all do what we have to do to get the job done, but that hardly justifies a major language change (and one where no obvious workable solution springs to mind). > Conditional compilation isn't always pretty - but then neither are rep > clauses or other things that are regularly done because that's the > easiest way to get the job done. I think you're comparing apples to oranges. Rep clauses are an elegant way of getting the job done; the only alternative is bit mask operations and those are a lot harder to understand. And they certainly aren't about just interfacing to hardware - I use them a lot to reduce storage use without making critical parts too slow. So I guess I'd say that rep. clauses ARE pretty. You'd be better off picking on Access_to_Address_Conversions or something like that -- except that no one much uses any of those packages. Perhaps because they are ugly. I'm not personally against conditional compilation, I just don't see any way to integrate a useful form of it into the language. (I don't think it is necessary in an ideal world, but the world is hardly ideal - people write gibberish in C and Java after all.) The form that Janus/Ada has (and we no longer use in new code because it isn't flexible enough) is a pure binary in-or-out scheme intended solely for marking debugging code. ('@' is either compiled as a comment "--" or as a space ' ' depending on the command line options.) Pragmas have a number of problems: they can't be used in some parts of the code (for example, formal_parts and discriminant_parts); such a pragma would violate "good taste in pragmas" as laid out in 2.8; and enough people think that they're ugly to prevent them from being used this way. (GNAT's pragma Debug was considered and discarded for this reason.) Some sort of syntax would be needed, and that seems like it would be pretty heavy. (And I have no idea what it ought to look like.) If you want to propose something, feel free, but remember that the ARG is not taking new topics anymore, so unless you can find a way to coordinate it with an existing AI, it will have to wait for Ada 1Z. Randy. All-in-all, it seems like there