Article View: comp.lang.objective-c
Article #47Re: Objective-C vs. C++
From: Ron Pomeroy x(Coop)
Date: Tue, 25 Aug 1992 18:24
Date: Tue, 25 Aug 1992 18:24
45 lines
2458 bytes
2458 bytes
In article <timm.714755187@void> timm@void.ncsa.uiuc.edu (Tim McClarren) writes: >>andy@uh.msc.edu (Andrew Hollenbeck) writes: >> >>>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"? >> >>>C++ is certainly more popular, but that doesn't necessarily mean that it is >>>better. You can walk into any bookstore and find a couple dozen C++ books, but I >>>have yet to find a single Objective-C book in those stores. >> >>There aren't any decent Objective books...don't waste your money on >>the Weiner and Pinson book. It's terrible. >> >>Anyways, the one main characteristic that distinguishes Objective from >>C++ is in the way that they do dispatch. Objective's objects have a >>field that indicates what class said object belongs to (called "isa"). >>Messages are sent by hashing on the selector. Thus, you can find out >>at run-time whether or not a particular object will respond to a given >>message. C++ doesn't know much about an object at all at run-time, >>all it has is a ptr. to a v-table. If you've ever seen/used SmallTalk, >>Objective is similar to it. >> >>I like that object model better, but I really wish Objective allowed >>you to declare things in-line instead of at the top of a block, like >>C++ allows. The other C++ features I can live without (MI, operator- >>overloading, etc.) >> >>-- >>Tim McClarren | "...a bajillion brilliant Jobsian lithium licks." >>timm@ncsa.uiuc.edu| >>(217)244-0015 | As a neophyte I would agree and also add that the Obj-C learning curve is not as steep as C++. Obj-C adds only a handfull of extensions to the C language. Also it's easier to read and a bit more elegant in general. -- Ronald Pomeroy Advanced Micro Devices CAM Applications Group rpomeroy@aunext3.amd.com
Technical Details
Message-ID:
<1992Aug25.182416.19476@dvorak.amd.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!olivea!veritas!amdcad!dvorak.amd.com!usenetReferences:
<timm.714755187@void>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!veritas!amdcad!dvorak.amd.com!usenet From: rpomeroy@aunext3.cam.amd.com (Ron Pomeroy x(Coop)) Newsgroups: comp.lang.objective-c Subject: Re: Objective-C vs. C++ Message-ID: <1992Aug25.182416.19476@dvorak.amd.com> Date: 25 Aug 92 18:24:16 GMT References: <timm.714755187@void> Sender: usenet@dvorak.amd.com (Usenet News) Reply-To: rpomeroy@aunext3.cam.amd.com Distribution: usa Organization: Advanced Micro Devices, Inc.; Austin, Texas Lines: 45