richard@pantor.UUCP (Richard Sargent) (07/26/89)
Hello,
I was quite take aback to find the following quote in the lead editorial
of this, usually good, magazine.
J.D. Hildebrand, Editor writes:
"The downside of standardization is that it tends to stifle evolution
and the adoption of valuable new features. The slowness of C compilers
to accomodate C++'s handful of new keywords is a case in point.
C implementations cannot simultaneously take advantage of object-oriented
programming's benefits and maintain compatibility with the ANSI standard."
Correct me if I am wrong (I am sure you will :-), but I had the impression
that "accomodating C++'s *handful* of new keywords" is what makes a C++
compiler rather than a C compiler.
I am hard-pressed to imagine how one might effectively make use of C++'s
object-oriented features without needing to "go all the way" and use a
C++ compiler. [Yes, I am aware of various means for implementing object-
oriented capabilities using C. They require considerable effort on the
part of the developer; effort better spent solving the problem.]
Richard Sargent Internet: richard@pantor.UUCP
Systems Analyst UUCP: uunet!pantor!richard
cowan@marob.masa.com (John Cowan) (08/16/89)
In article <19.UUL1.3#5109@pantor.UUCP>, richard@pantor.UUCP (Richard Sargent) writes: >J.D. Hildebrand, Editor writes: >>"The downside of standardization is that it tends to stifle evolution >>and the adoption of valuable new features. The slowness of C compilers >>to accomodate C++'s handful of new keywords is a case in point. >>C implementations cannot simultaneously take advantage of object-oriented >>programming's benefits and maintain compatibility with the ANSI standard." > >Correct me if I am wrong (I am sure you will :-), but I had the impression >that "accomodating C++'s *handful* of new keywords" is what makes a C++ >compiler rather than a C compiler. Perhaps the term "accomodate" merely means "recognize as a keyword of C++, and reject as an identifier", rather than meaning "implement with C++ semantics". A C compiler could have a (non-ANSI-compliant) mode in which "virtual", "class", and the like are rejected for use as identifiers, with a message like file "foobar.c", line 32: 'class' is a C++ reserved keyword In strict-ANSI-compliance mode, this error cannot be given, because "class" is within the space of user-definable identifiers and the user is free to use it to name a variable, function, label, or what have you. Even a strict- ANSI-compliance compiler can warn about this use, however, since compilers are free to warn about anything whatever (see comp.lang.c). -- Internet/Smail: cowan@marob.masa.com Dumb: uunet!hombre!marob!cowan Fidonet: JOHN COWAN of 1:107/711 Magpie: JOHN COWAN, (212) 420-0527 Charles li reis, nostre emperesdre magnes Set anz toz pleins at estet in Espagne.