[PLUG] C++ is too complex (was: Having problems loading shared libraries. (fwd))

Phil Tomson ptkwt at aracnet.com
Wed Aug 28 16:14:35 UTC 2002


On 28 Aug 2002, Russell Senior wrote:

> >>>>> "Jason" == Jason Dagit <dagit at engr.orst.edu> writes:
>
> Jason> It has been my feeling for a while now that because C++ is OOP,
> Jason> it causes people to think about the design longer, causing
> Jason> people to write a better design, but because the langauge is
> Jason> more complex than most programmers are used to, it can lead to
> Jason> very complicated, hard to maintain code.  If you screw up in
> Jason> the implementation (ie. in c you have a buffer over flow) then
> Jason> you have shot your foot.  But if you screw up the design
> Jason> (ie. in c++ you misuse a language feature to express some OO
> Jason> concept) then it can have far reaching consequences down the
> Jason> line.  I know C++ has many improvements over C, and it really
> Jason> does help conceptualize some problems, but it is a VERY complex
> Jason> langauge that allows you to do many things you shouldn't be
> Jason> doing...And you can create bugs which "don't make sense"...
>
> Jason> Many times, simple is better and less is more.  Not saying c++
> Jason> is a waste of time, I just wish it wasn't so complex.
>
> Here is a brief section from the introductory chapter of _On Lisp:
> Advanced Techniques for Common Lisp_ by Paul Graham, now out-of-print
> but the copyright has been recovered by the author and it is now
> available online at <http://www.paulgraham.com/onlisp.html>, from
> Section 1.1 Design by Evolution:
>
>   [...] And if you're not sure yet what kind of program you're
>   writing, it's a safe bet to write it in Lisp. Whatever kind of
>   program yours turns out to be, Lisp will, during the writing of it,
>   have evolved into a language for writing _that_ kind of program.
>
<snipped stuff about Lisp's flexibility>

Lisp isn't the only language that gives you this kind of flexibility, in
general you can say the same about dynamic languages as a class of
languages - you could say similar things about SmallTalk or Ruby for
example.

The previous poster is right, you have to be a lot more careful about the
up front design in C++ because it'll be a lot harder to change the
architecure later.  As an analogy you can think of working with C++ like
sculpting in marble and working with the dynamic langauages like sculpting
in modeling clay.  Some might argue that having to pay more attention to
your design up front is a good thing that C++ forces you to do.  Others
(in the agile design camp) will argue that you can never forsee all of the
requirements upfront and it's best to just consider change a part of
reality and get used to it.


Phil





More information about the PLUG mailing list