Besides : even Bjarne Stroustrup states that C++ is based on C...
But C is not based on Pascal, nor vice versa, nor do they have the
same "direct parent".
There's no special relationship between an entity's history and what
it now most closely resembles. Consider, for example, phylogeny.
And even if Stroustop has an opinion on how closely C++ resembles
other languages, that's not a compelling argument. It's not an
argument at all, in fact, until you can demonstrate why Stroustrop's
opinion in this matter is relevant. (Here's a hint: his status as
the inventor of C++ does not constitute such a demonstration.)
Did they not teach rhetoric in your school?
C++ can be considered a superset of C for practical purposes.
Only by the lazy-minded.
And, thus, C can be considered a subset of C++.
Only by the foolish.
I know there are those who like to make a big deal out of some subtle
differences but I'd like to point out that the differences between
Pascal and C are much greater in this respect.
Your point is either misstated or incorrect. There are vast differ-
ences between C++ and either C or Pascal - much more significant
than the mostly syntactic differences between the last two. If you
mean to compare only the syntactic differences between the common
subset of C++ and C, on the one hand, and C and Pascal on the other,
what makes you believe that is significant in determining what makes
one language "like" another? Syntax is the least important char-
acteristic of a programming language.
ML is more like LISP than it is like Pascal, even though its syntax
is more like the latter's, for example.
Really, you two are in denial. I feel a great resistance to
acknowledging the (obvious) relation between C and C++. Some
psychotherapy might be needed ;-)
I urge you to seek some. It might disabuse you of the notion that
every idea which seems obvious to you must be true.
I can't help but notice that you have yet failed to offer a coherent
argument in this discussion, resorting instead to declaring that
you've already won, as you do here and earlier (with your snide
remark about "the iron grip of reason"). Hardly the mark of a man
operating from a well-constructed defense of his position.
And C++ can be used to write purely procedural code.
What's your point? That C++ is more like C than Pascal is, if you
ignore all the parts of C++ that aren't like C?
The OO part of
C++ is arbitrary (it's not arbitrary in Java, for example).
Please demonstrate how Java is not Turing-complete if its OO
features are not used. For the sake of argument, let's say that
includes encapsulation, polymorphism, and inheritance.
--
Michael Wojcik (e-mail address removed)
Auden often writes like Disney. Like Disney, he knows the shape of beasts --
(& incidently he, too, might have a company of artists producing his lines) --
unlike Lawrence, he does not know what shapes or motivates these beasts.
-- Dylan Thomas