[geeks] Go Apple....
Jonathan C. Patschke
jp at celestrion.net
Sun Jul 28 15:30:51 CDT 2002
On Sun, 28 Jul 2002, Joshua D Boyd wrote:
> And isn't nearly every piece small fast C code also small fast C++ code?
>From what I've read of his books, that is a statement that would make
Stroustrup reach out from behind the compiler and smack your fingers.
If you mean that statement as in "will compiler with a C++ compiler", the
answer is "usually". There are valid C programs that are not valid C++
programs.
However, that's not C++ code. It's C code compiled with a C++ compiler
(and thus with name mangling and everything else). C++ done -correctly-
is -not- C with objects, it's object-oriented C. A lot of "C++ code" is
an insult to the language, crafted by writing perfectly good blocks of C
and then inserting classes. To do so is as much of an insult as it would
be to write a large block of multipurpose Scheme code as a single non-
recursive function containing massive nested conds with a bunch of
homegrown for-loops.
So, yes, the code will probably compile, but you're missing out on all the
idioms and features that make C++ a unique language.
DISCLAIMER: I think C++ is a pile of crap, but at least let it be a piece
of crap on its own terms--it's far more humiliating that way.
--
Jonathan Patschke
"gnu: we aim to fuck up everything with the potential to not suck"
--alex j avriette
More information about the geeks
mailing list