Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!linus!philabs!pwa-b!mmintl!franka From: franka@mmintl.UUCP (Frank Adams) Newsgroups: comp.lang.misc,comp.lang.smalltalk,comp.lang.c++ Subject: Re: C++ vs Objective-C Message-ID: <2582@mmintl.UUCP> Date: Wed, 25-Nov-87 19:08:17 EST Article-I.D.: mmintl.2582 Posted: Wed Nov 25 19:08:17 1987 Date-Received: Mon, 30-Nov-87 00:41:02 EST References: <980@mas1.UUCP> Reply-To: franka@mmintl.UUCP (Frank Adams) Distribution: na Organization: Multimate International, E. Hartford, CT. Lines: 33 Keywords: Dynamic Binding or Not Xref: mnetor comp.lang.misc:914 comp.lang.smalltalk:434 comp.lang.c++:612 In article <980@mas1.UUCP> hawley@mas1.UUCP (Ken Hawley) writes: |If you are building an end user system, you can sub-class to your heart's |content. However, if you are building a GENERIC PRODUCT, then there are |serious shortcomings to the extensive use of sub-classing. I'm afraid I don't see them. Please elucidate. |The alternative is to use a small number of generic objects together with |(what Cox has called) property lists to configure or "parameterize" those |objects for a particular application. Voila! Dynamic binding without the |binding! You don't get type checking either, but you have gained something |much more valuable: a generic application. I don't see what advantage this has over inheritance. It strikes me as a recipe for confusion and disaster. Now, I've been known to be wrong before, but I quite literally do not see any advantages to this approach. |To go back to Cox's example: consider the automobile assembly. You could |have a wheel object, a vehicle object, an engine object, a trunk object, etc. |Or you could have one, "assembly" object which takes on the properties of a |wheel, a vehicle, an engine, or a trunk depending upon how it's configured. |In the first case, if you change the engine, you must change the class. In |the second case, you merely change the property list. I can as easily say: in the first case, you merely change the class. In the second, you must change the property list. Changing the class is not a difficult operation! And I still want type checking. -- Frank Adams ihnp4!philabs!pwa-b!mmintl!franka Ashton-Tate 52 Oakland Ave North E. Hartford, CT 06108