From: comeau@csanta.attmail.com (Greg Comeau)
Subject: Re:  Obj-C vs. C++
Originator: comeau@well.sf.ca.us
Reply-To: comeau@csanta.attmail.com (Greg Comeau)
Organization: Comeau Computing
Date: Tue, 13 Oct 1992 11:44:19 GMT

>dnavas@oracle.uucp (David Navas) writes:
>> C++, it seems to me, was designed to provide an object-oriented >interface<
>> to C, where Obj-C was designed as an object-oriented language with similar
>> syntax as C.
>
>  I guess this is a matter of opinion. Obj-C always looked like someone
>tried to graft small-talk on top of C. C++ seems more C-like, and if you
>like C syntax (I do), it seems more elegant.

I think that is more of a fact rather than opinion.  And I do not say
this is a derogatory fashion: it was part of the way O-C was borne,
and *is* a Smalltalk/C situation.

>> I'm not sure how stringent Obj-C type-checking is, but it's worth
>> noting that if your methods are bound at run-time, it'd be rather
>> difficult to type-check them at compile time....

Maybe.

>.... The only possiblity that
>I can think of is that it might be somehow possible to "dynamically
>link" new messages into a running program, and then send these
>messages to existing objects. Is this possible? Do you have any other
>examples?

You can do stuff like this.  Nothing is stopping you from writing
a dispatch C++ class to do any of this either.

>> At the same time, I don't understand how you can possibly claim that
>> an object-oriented language is polymorphic when methods are bound at
>> compile-time.
>
>  See the above. C++ is polymorphic.

Correct.  All C++ methods are not bound at run-time.  The difference
is that the choices are known, but that does not rule out polymorphism.
Further, it is worth noting that recent O-C's also possess this
aspect.

>> Depends.  Again, remember that there are competing design goals.
>> C++ produces code that is -essentially- not object-oriented, but it
>> is created in an environment that is [God, I feel the flames
>> already, why do I make such wild generalizations?]. n

You're mixing total apples and oranges.  The code produced in and of
itself from *any* OOL is not _necessarily_ OO'ted, nor was there any design
criteria that this be so in C++.

I agree: why do you may such wild generalizations?  Wild and out of
context facts are bad enough.  Let's all try and resist slip of the tongues
and such that the net is unfortunately so famous for and instead
try and research information before posting, or at the least label
*each and every* case with an "it's my understanding that..." or somesuch.

>  I do agree that polymorphism is an absolute necessary feature of an
>"object oriented" language; however, as explained above, C++ has this
>feature.  Perhaps after reading my above explaination, you'd like to
>reconsider this statement. You can write completely object oriented
>code in C++!

C++ has at least all the minimal features of an OOL.
This is undisputable IMO.  One can argue that it is not a
so called pure'' OOL, and I will buy that (I just won't
entertain it ;-}).

- Greg
-- 
         Comeau Computing, 91-34 120th Street, Richmond Hill, NY, 11418
                   Producers of Comeau C++ 3.0 With Templates
          Here:attmail.com!csanta!comeau / BIX:comeau / CIS:72331,3421
	    Voice:718-945-0009 / Fax:718-441-2310 / Prodigy: tshp50a
Newsgroups: comp.sys.amiga.programmer