🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #4972

Re: C++ vs Objective-C

#4972
From: Frank Adams
Date: Mon, 16 Nov 1987 17:58
30 lines
2306 bytes
In article <1662@ppi.UUCP> cox@ppi.UUCP (Brad Cox) writes:
>For example,
>consider the different kinds of problems in building an automobile.
>In designing the AutomobileEngine it is appropriate and useful to
>state as early as design time that each EngineCylinder can contain 
>only instances of class Piston, and to have this desicion strictly
>enforced (strict type-checking) during the implementation phase. Static
>binding is the right tool for this job. By contrast, in designing the
>AutomobileTrunk, it is not desirable to make these kinds of decisions 
>any earlier than when the automobile is put into service. ...
>So much for the contribution of dynamic binding. How about dynamic binding
>as provided by C++ as opposed to Objective-C?

The main problem with Objective-C, in my opinion, is that while it supports
both of these extremes, there is in fact a whole spectrum in between; and it
provides no support for the intermediate cases.

To continue the analogy above, consider the seats of the automobile.  One
may have bucket seats, bench seats, or something new some designer comes up
with tomorrow.  So dynamic binding is useful and natural here.  However,
the seats had better be some kind of seat -- it won't do to put in radios or
air conditioners instead.

C++ provides exactly the machinery to let you define this.  Objective-C
forces you to give up type checking entirely for cases where you want any
dynamic binding.
-- 

Frank Adams                           ihnp4!philabs!pwa-b!mmintl!franka
Ashton-Tate          52 Oakland Ave North         E. Hartford, CT 06108
Technical Details
Message-ID: <2562@mmintl.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!rutgers!labrea!decwrl!pyramid!prls!philabs!pwa-b!mmintl!franka
References: <3405@ece-csc.UUCP> <638@its63b.ed.ac.uk> <1811@watcgl.waterloo.edu> <3179@ames.arpa> <1662@ppi.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!rutgers!labrea!decwrl!pyramid!prls!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: <2562@mmintl.UUCP>
Date: Mon, 16-Nov-87 12:58:55 EST
Article-I.D.: mmintl.2562
Posted: Mon Nov 16 12:58:55 1987
Date-Received: Sat, 21-Nov-87 01:09:09 EST
References: <3405@ece-csc.UUCP> <638@its63b.ed.ac.uk> <1811@watcgl.waterloo.edu> <3179@ames.arpa> <1662@ppi.UUCP>
Reply-To: franka@mmintl.UUCP (Frank Adams)
Organization: Multimate International, E. Hartford, CT.
Lines: 30