🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.objective-c
4 messages
4 total messages Started by d.wagley Fri, 24 May 1991 14:32
Examples please
#327
Author: d.wagley
Date: Fri, 24 May 1991 14:32
13 lines
866 bytes
I've heard alot of complaints in this newsgroup about how C++ is
inferior to objective-c. One nice thing about C++ is that it's
easy to find lots of information on it. The only thing I've found
so far on objective-c is Brad Cox's book, which seems to be more
a discussion of the object oriented approach than a tutorial on
objective-c. 

Perhaps one of the experienced objective-c programmers who has seen
the light could post some simple commented examples of objective-c? 

					Thanks,
					   Doug
Re: Examples please
#328
Author: Scott Hess
Date: Fri, 24 May 1991 22:56
48 lines
3124 bytes
In article <1991May24.143213.25931@cbnewsl.att.com> wag1@cbnewsl.att.com (d.wagley) writes:
   I've heard alot of complaints in this newsgroup about how C++ is
   inferior to objective-c. One nice thing about C++ is that it's
   easy to find lots of information on it. The only thing I've found
   so far on objective-c is Brad Cox's book, which seems to be more
   a discussion of the object oriented approach than a tutorial on
   objective-c. 

Not that I'm going to offer up any example code - I've got what I've
written on the NeXT-specific archives, and since it's all NeXT-
specific code, it's not good Objective-C example code.

But, I think you've taken any of the c++ denigration that periodically
occurs on this group wrong.  C++ isn't really inferior to Objective-C,
anymore than a tire iron is inferior to an Allen wrench.  It's just
that they don't do the same jobs.  When you need an Allen wrench, a
tire iron does you no good, and vice versa.

Obviously, c++ and Objective-C are slightly closer than tire irons
and Allen wrenches, but those things they do _well_ are far enough
apart to make the overlap a relatively minor consideration when you
are deciding on a new language.  For instance, you cannot do the
'perform:', 'perform:with:' and other similar methods in c++
at this time - while c++ is excellent at encapsulating small
chunks of information (Objective-C is not, as it's less efficient
if you get too fine-grained, at least when compared with c++).

The question people really need to consider before deciding
between the two languages is whether either of them even fit
their needs.  Then, they should decide if maybe _both_ could
be used (not really a solid option until GNU's Objective-C
comes out), and only then should they decide which one makes
the most sense in their situation.  If the first two questions
are asked in a serious manner, and answered objectively (pardon
the pun), the third question would seldom (if ever) need to be
asked.

Later,
--
scott hess                      scott@gac.edu
Independent NeXT Developer	GAC Undergrad	<Finals done!>
<I still speak for nobody>
Note:  I will be moving home soon.  My email address will still be
valid.  Any SnailMail should be redirected, along with phone calls.
At the least, my parents can tell you how to get hold of me, or
forward any mail . . .
Old:	PO 829, GAC, St. Peter, MN  56082	(507) 933-8466
New:	RR#4 Box 227 Pipestone, MN  56164	(507) 825-2788
Fabrication versus Assembly Technologies; C++/Objective-C
#330
Author: Brad Cox
Date: Mon, 27 May 1991 12:54
28 lines
1845 bytes
In article <SCOTT.91May24175620@mcs-server.gac.edu> scott@mcs-server.gac.edu (Scott Hess) writes:
>C++ isn't really inferior to Objective-C,
>anymore than a tire iron is inferior to an Allen wrench.

Thank you, Scott, for your rational treatment of this much-abused topic.

I'd modify your analogy in the following way, however. I'd substitute
silicon fabrication lines and soldering irons for your tire iron
and allen wrench analogy.

C++ is *primarily* a silicon fabrication line; a technology for fabricating
software from first principles. Objective-C is *primarily* a soldering iron,
a technology for assembling pre-fabricated components. 

Note the emphasis on *primarily*. Objective-C and C++ are not so cleanly
separated along this fabrication/assembly dimension as Ada and Smalltalk are. 

Bjarne and I both started from the middle by using C as the base.
But whenever we faced a technical choice, he leaned to the right 
(pro-fabrication) and I to the left (pro-assembly).

The point that is often missed is that neither fabrication nor assembly
make sense without the other. This is why Objective-C retains C as its
base, and why C++ has dynamic stuff like virtual functions.
-- 

Brad Cox; cox@stepstone.com; CI$ 71230,647; 203 426 1875
The Stepstone Corporation; 75 Glen Road; Sandy Hook CT 06482
Re: Examples please
#331
Author: Greg Comeau
Date: Tue, 28 May 1991 12:36
43 lines
2901 bytes
In article <1991May24.143213.25931@cbnewsl.att.com> wag1@cbnewsl.att.com (d.wagley) writes:
>
>I've heard alot of complaints in this newsgroup about how C++ is
>inferior to objective-c. One nice thing about C++ is that it's
>easy to find lots of information on it. The only thing I've found
>so far on objective-c is Brad Cox's book, which seems to be more
>a discussion of the object oriented approach than a tutorial on
>objective-c. 

I DO NOT want to be responsible for a O-C vs C++ rwar here.  I would
like to mention though that as this *is* an O-C newgroup, there *are*
going to be biased opinions expressed here.  To be fair though, there
will also be unbiased ones.

As to which language is inferior.... there is no question that certain
individuals will fight to their death over this.  My own personal preference
is for C++, and I have used it quite successfully, but many O-C enthusiasts
will be able to make the same claim.  The bottom line is not quite the question
of which is inferior or superior, but which does the better job for *you*.
And in addition, which does the better job for your projects.  FOr instance,
if it's more of a Smalltalk'y feel  you want, the O-C is probabky the best
route to take.  If it's early compiler diagnosticis, strong typing, more info
and availability, then go with C++.  O-C is typically better at prototyping
though.  But the C++ is a true C graft.  And so on.  Neither really ever
truly wins.

If you look at my .signature, the above may sound odd coming from me.
But that is the way it is.  I mean it's really  no different than asking
whether C is better than Pascal.  My preference is pro C and to snarl at
Pascal.  Realistically though, it just means I favor C as besides issues
like C's pointer capability the 2 languages can be used similarly.  But issues
just like C's pointer capbilities are where individuals draw their lines.
For instance, I may see the power and usability of C pointers, while a
Pascal'ite see terse and unreadable code with no type checking.

Which is worst?  Neither.  Which is better?  That depends.

- Greg
-- 
	 Comeau Computing, 91-34 120th Street, Richmond Hill, NY, 11418
                          Producers of Comeau C++ 2.1
          Here:attmail.com!csanta!comeau / BIX:comeau / CIS:72331,3421
                     Voice:718-945-0009 / Fax:718-441-2310
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads