Relationship between C and C++

William Thomas Wolfe, 2847 billwolf%hazel.cs.clemson.edu at hubcap.clemson.edu
Tue Mar 20 01:53:26 AEST 1990


>From peter at ficc.uu.net (Peter da Silva):
> Classic Ada is no more Ada than C++ is C.

  Then perhaps we should ask, "Exactly what IS the relationship
  between C++ and C?"  Let's see what recently-quoted author Bertrand
  Meyer (author of _Object-Oriented Software Construction_) has to say:

...Quoting from Dr. Bjarne Stroustrup's ``The
C++ Programming Language'' (Addison-Wesley, 1986), which seems to be the
major reference on C++, page 22, lines 13-14: ``A C++ program typically
consists of many source files, each containing a sequence of declarations
of types, functions, variables, and constants''. This is very far from the
object-oriented model of software decomposition. 

...One of my major objections to C++ stems from what that language has
rather than what it has not. Because C++ retains almost total
compatibility with C, it keeps all its low-level and dangerous features.
The design of C dates back to the late sixties and is obsolete
by modern software engineering standards.

Compatibility with C means that in C++ you still have pointers,
type casts, pointer arithmetic, function pointers, malloc, free, bizarre
operator precedence (the famous asterisk/parenthesis bugs),
weak type checking and so on.

    I strongly disagree with this approach if the goal is to obtain software
quality. Take pointer arithmetic, for example. I would contend that you can
have quality software, or you can have pointer arithmetic; but you cannot
have both...

-- Bertrand Meyer
bertrand at eiffel.com
4 Jun 89 23:48:27 GMT



More information about the Comp.lang.c mailing list