From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 3 Aug 93 15:16:18 GMT From: louie!balin.cis.udel.edu!carroll@louie.udel.edu (Mark C. Carroll) Subject: Re: C++ is a preprocessor (was Admiral Tuttle Revisited ...) Message-ID: <1993Aug3.151618.13726@udel.edu> List-Id: In article <9307250105.aa25189@dsc.blm.gov> cjames@DSC.BLM.GOV (Colin James 062 1) writes: > > >A number of writers on internet are attempting to defend the integrity >of C++ on the basis that C++ is not a preprocessor, but that C++ can >be a preprocessor depending on the implementation. C++ is a programming language, not a compiler, not a preprocessor. Let's see if we can get that straight, OK? Some implementations of C++ use C as their target language, rather than assembly language. If you want to claim that that makes those implementations preprocessors, fine. But realistically, it's a non-issue. If I implement an Ada compiler that outputs C as its target language, can I therefore conclude that Ada is nothing but a preprocessor? And in any case, *what difference does it make*? Ada is a *programming language*; C++ is a *programming language*. The exact mechanics used in translating it to object code aren't all that important: what is important is the quality of the language. If you want to compare Ada-9x to C++, I think Ada is going to win hands down on its own merits. There's no need to bring up the compilation mechanisms of C++ compilers - ignoring that entirely, Ada is a far better programming language. (And that statement is coming from a person who isn't much of an Ada fan!) >The argument turns on what the notion of preprocessor means. The liberal >definition, as used by the critics, is that a preprocessor is really an >implementation form or part of a compiler. What follows then is that >C++ is a compiler, whether or not it is a preprocessor. I disagree. When you say preprocessor, most people think of things like cpp or m4, not cfront. The difference between a preprocessor and a compiler is that a preprocessor doesn't do any semantics: it does strictly syntactic transformations on its input, but doesn't do any kind of semantic analysis. If the transformation of the input relies on semantic analysis, then it's a compiler. So by this definition, cfront is NOT a preprocessor - it's a compiler that uses C as its target language. -- || Mark Craig Carroll: ||"In all seriousness of truth, hear this: || CIS Grad, U of Delaware || without the It, one cannot live. But || PGP Key Available, by finger || whoever lives with It alone is not || carroll@udel.edu || human" - _I_and_Thou_, by Martin Buber