From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
Subject: Re: Need help implementic data structures of generic objects
Organization: MAXTAL P/L C/- University Computing Centre, Sydney
Date: Wed, 16 Dec 1992 14:13:41 GMT

In article <1992Dec13.002551.778@informix.com> cshaver@informix.com (Craig Shaver) writes:
>
>*** WARNING ***
>flame on!
>Another tech weenie C++ bigot speaks out against Object Oriented Programming
>methodology in general!  (no :')
>flame off!

	You presumably are the expert in OO Craig? You can resolve
dispute the top people in OO are involved in? Sure you know
what OO actually is? Please tell me, because I dont know exactly.

>
>This group seems to be biased against inheritance techniques in all cases.
>

	What gave you that strange idea? Is the suggestion
that inheritance is sometimes inappropriate indication of bias?

	Of course this group *is* biased about OO, the group
is about C++, not OO. 

	C++ supports other styles than OO, and in particular
does not support the dynamic type of OO used in Smalltalk 
very well at all.

>
>It is obvious to me that you have a virtual function in the base class for 
>all functions that you need to use when dealing with 'Objects'.

	Yes. Exactly. In C++ there is exactly one such function:

	virtual ~Object(){}

a virtual destructor. This ensures all things derived from Object
are properly deleted, and also allows dummy objects differing
only in their addresses (identities) to be created.

	No, you are also wrong, you said "you need to use",
and you should have said "everyone everywhere". The whole
idea is to have reusable components.

>
>If you use a function on a class that is only restricted to a certain
>sub-tree of your inheritance structure, then you know what you are using,
>ergo, you should have used that type instead of 'Object'.

	So what is the point of class Object, if you never use it?
Because it doenst have any useful methods 
(except a dummy virtual destructor)?

>
>IMHO, if you do not use inheritance, you are not doing OOP.  If you do
>not care, then you are just using C++ as a variation on C with no real
>benefit.

	Religious drivel. I use inheritance, and I also use
C++ prinicpally as and ADT language, not as an OO one. Thats because
most of the time polymorphism just isnt so important in what I do.
I use it when I think it appropriate.

	And I definitely get huge benefits. The biggest benefits
come from

	a) my string class, which is entirely concrete,
	and which I have derived specialised classes from
	for purposes of *reuse*, but no polymorphism was involved.

	b) My list class (AKA extensible array) which is a template
	and again has no polymorphism.

and in both cases I'm using C++ as a smarter C with classes,
as and ADT language, as a procedural language, and I'm
using classes as modules and types---but not using polymorphism.

Most of the uses I have for virtual functions involve pure
virtuals in an abstract base, and some implementation(s) of them,
which is really ADT programming not OO.
>
>The tech weenies that like technology for technology's sake are just
>so much useless overhead.  I have seen too many hackers take a good idea
>to extremes and I feel that this is happening wherever C++ is being
>used in a commercial environment.

	I thought this a rather good description of what your
own view appeared to be. Isnt it you making OO a God?
>
>The reason commercials are using C++ is because they have heard that OOP
>will save them money and allow them to build more software faster and with
>fewer bodys.  If this does not turn out to be the case then C++ will not
>be used.  

	It has already turned out to be the case that C++ is a much,
much, much, much better language than C. Absolutely no programmer
*I* know of with >1 years C++ experience would willingly
go back to C, and some would refuse point blank unless there were
no alternative (I still write assembler .. :-)

>The point being that if everyone does not use C++ to build economical
>and reusable solutions then eventually a backlash will occur and it will
>start to get the bad press it deserves.  

	Not everyone need be successful. IMHO those using
the Smalltalk model will not be (if they are writing C++, that is).

>I think this is starting to
>happen, and I expect to hear something soon out of Borland about this
>subject.

	You're kidding yourself. One of the premier compiler
writers deriding their own product?

>
>So if you insist on making something more complicated than is needed and
>you do not use good sense and good software engineering practices; it may come
>back to haunt you.  But like most sniveling nerdy tech weenies you will
>be on your way with C++ stamped on your resume.  The last company will
>be trying to sweep the embarrassment you left behind under the rug.

	I dont think this will happen, your former analysis was more
correct: companies will use C++ because everyone else is,
without really knowing what benefits it can bring.

-- 
;----------------------------------------------------------------------
        JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
	Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
;--------------- SCIENTIFIC AND ENGINEERING SOFTWARE ------------------