From: louie!balin.cis.udel.edu!carroll@louie.udel.edu (Mark C. Carroll)
Subject: Re: C++ is a preprocessor (was Admiral Tuttle Revisited ...)
Date: 3 Aug 93 15:16:18 GMT [thread overview]
Message-ID: <1993Aug3.151618.13726@udel.edu> (raw)
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.
<MC>
--
|| Mark Craig Carroll: <MC> ||"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
next reply other threads:[~1993-08-03 15:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1993-08-03 15:16 Mark C. Carroll [this message]
-- strict thread matches above, loose matches on Subject: below --
1993-08-03 19:27 C++ is a preprocessor (was Admiral Tuttle Revisited ...) Alex Blakemore
1993-08-03 21:56 cis.ohio-state.edu!news.sei.cmu.edu!ajpo.sei.cmu.edu!wellerd
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox