[MUD-Dev] Languages

clawrenc at cup.hp.com clawrenc at cup.hp.com
Thu May 22 11:04:09 CEST 1997


In <338341BE.4DE0CA2D at darklock.com>, on 05/22/97 
   at 08:37 AM, Caliban Tiresias Darklock <caliban at darklock.com> said:

>AMEN!!!!! I have offered the same two challenges to every C++
>programmer I've met. No one has ever satisfactorily responded.
>	1. Show me one thing object oriented programming does which proper 
>	structured programming discipline can not.

OO merely adds a different viewpoint and framework to coding.  Much
very good structured programming is *also* OO in approach.  Its not a
new or unique technology, its not a new set of previously missing
definitions, its a paradign shift which restructures your view and
approach to the same old field of programming.

>	2. Show me one C++ construct that is impossible to implement in C.

Don't be silly.  Of course not.  If the above challenge were
impossible it would not be possible to implement C++ as a translator
to C ala Cfront.

<<Aside: It might be tough to implement the new dynamic casts, but I
haven't checking into them in enough detail>>

>The major arguments I receive on this are:
>	1. Inheritance. I respond, 'void *parent'.
>	2. Methods in classes. I respond, 'int (*method)()'.

Which is more or less what Cfront does.  Bjarne's original
presentation of C++ classes was as structures with in-built function
pointers.

>I do admit that you can write a program much faster in C++ when you
>use the proper class libraries, and C++ can indeed be made much more
>readable. But starting from a blank text file and using no class
>libraries at all, just the standard C and C++ compiler libraries, 

I'd note here that the standard C++ library now encludes the IOStreams
and STL libraries, which gives you all the collection classes and an
extensible IO framework.  Your contention was much more supportable a
year or two ago.

>The benefits of C++ are in code reuse, but code reuse is not always
>an appropriate thing, and you have to have some C++ code to reuse
>first.

True, however the code base for generic re-use is getting large enough
that its becoming attractive in its own right.  (eg STL, ACE, OSE,
Arjuna, etc.  See the C++ libraries FAW for other details).

--
J C Lawrence                           Internet: claw at null.net
(Contractor)                           Internet: coder at ibm.net
---------------(*)               Internet: clawrenc at cup.hp.com
...Honorary Member Clan McFUD -- Teamer's Avenging Monolith...




More information about the mud-dev-archive mailing list