🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.objective-c
Article #79

Re: Objective-C vs. C++

#79
From: Peter Kocks
Date: Wed, 02 Sep 1992 20:34
37 lines
2375 bytes
In article <1992Aug25.142415.7762@uc.msc.edu>, andy@uh.msc.edu (Andrew
Hollenbeck) says:

>I've used C++ and would like to know what distinguishes Objective-C from C++.
>The Objective-C FAQ (Q6/A6) only indicates features that C++ contains that
>Objective-C lacks.  What features of Objective-C make it "better"?
>

LATE BINDING!!! is one very important feature of Obj-C, which is not
defined in C++.  In C++ you must do late binding on the os level (like
resource forks on the Mac) or extend the language for a particular
compiler (like the DDL libraries of MS). 

Why is this so important?  Because a truly object oriented working
environment (eg one where objects can be added or subtracted by the
user of an application) requires that the application not know all the
detials of the objects used by the appilcation before compiling.  MS
gets around this problem with DDL libraries, but this only works for
systems and compilers which can use those libraries.  Obj-C does late
binding by default.  You can write an application in Obj-C and make
use of late binding and then bring it to another os and recompile and
still have late binding.  If you use C++ you will have to do a lot
more tailoring to the native os.  

This may seem like a somewhat minor point, but I think it extremely
important.  As user environments become more and more object oriented,
it will be increasingly important to develop custom objects.  In C++
you will have to write the object and then either relink the
application or use something like a DDL library.  If you do the later,
as I suspect many people will do.  Then when you go to a Mac you will
have to completely rewrite the object again.  If you had used Obj-C
you may need to make some minor modifications, but going between
enviroments would be comparatively easy.

--Peter Kocks
  kocks@chemistry.stanford.edu
Technical Details
Message-ID: <1992Sep2.203408.28404@leland.Stanford.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!leland.Stanford.EDU!jessica.stanford.edu!kocks
References: <1992Aug25.142415.7762@uc.msc.edu> <92238.232226MKK2@psuvm.psu.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.objective-c,comp.lang.c++
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!leland.Stanford.EDU!jessica.stanford.edu!kocks
From: kocks@jessica.stanford.edu (Peter Kocks)
Subject: Re: Objective-C vs. C++
Message-ID: <1992Sep2.203408.28404@leland.Stanford.EDU>
Sender: news@leland.Stanford.EDU (Mr News)
Organization: Academic Information Resources
References: <1992Aug25.142415.7762@uc.msc.edu> <92238.232226MKK2@psuvm.psu.edu>
Date: Wed, 2 Sep 92 20:34:08 GMT
Lines: 37