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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f34f1a1939dc0c40 X-Google-Attributes: gid103376,public From: Robert A Duff Subject: Re: conditional compilation Date: 2000/08/02 Message-ID: #1/1 X-Deja-AN: 653674656 Sender: bobduff@world.std.com (Robert A Duff) References: <87d7jvp3qq.fsf@chiark.greenend.org.uk> <39857E5F.33C40014@acm.com> <3985FB16.82D140BB@below.for.email.address> <8m6log$r3a$1@nnrp1.deja.com> <398749EF.15829554@below.for.email.address> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 2000-08-02T00:00:00+00:00 List-Id: Simon Brady writes: > Been there, done that... I think the literate programming crowd offer a > useful insight here: programs aren't the same thing as representations > of programs, and what the compiler sees isn't necessarily what the > programmer should see. I don't like so-called literate programming for the same reason I don't like C macros. In order to understand the code, you have to imagine the actual output of the macro preprocessor. (I admit that C macros are the worse of the two, of course.) In any case, from a language design point of view, if you think the compiler should see things in a different order or different organization than human beings, then clearly the programming language is poorly designed. Macros can be used to get around poor language designs. > Imagine an editor integrated with the C preprocessor that supported such > multiple views (I guess it would also have to grok makefiles and other > source-molesting tools like lex and yacc). I imagine you would get into a mode where you hack upon one particular target, and break all the others. - Bob