# Whats the Difference?



## whitesaint (Aug 10, 2001)

Hey can anybody help me with this?  Well i know a good amount of C, i know alot of Objective C, but i dont know any of C++.  I have read from many books that C++ is an object oriented language.  If C++ and Objective C both focus on the language "C" in an object oriented way, whats the difference?  All feedback is appreciated and welcome, thank you

-whitesaint


----------



## Kartoffel (Aug 10, 2001)

<i>i know a good amount of C, i know alot of Objective C, but i dont know any of C++</i>

Oh, really?  Learn some C++ to see the difference.


----------



## AdmiralAK (Aug 10, 2001)

I only know ANSI C and I am quite content


----------



## whitesaint (Aug 10, 2001)

okay so i guess no one knows and i have to find out for myself as usual...


----------



## endian (Aug 11, 2001)

C++ was developed for efficiency above all else. It moves as much decisionmaking as possible into compile-time and out of runtime. Objective-C was developed as a true OO language, with alot of information available at runtime that is thrown away in C++

C++ lacks all the dynamism of Objective-C - no delegation, no posing, no forward invocation, etc. 

C++ has multiple inheritance, where a class can have more than one superclass, Obj-C doesn't.

C++ is the most common OO language in use today, Obj-C isn't.


----------



## AdmiralAK (Aug 11, 2001)

I just had a question pop up in mu head 

What is THE MOST efficient language out there?  This is concerning all aspects of it, coding, compiliing, debugging, and running.
(Not just from the C family)


Admiral

PS: can anyone tell me who developed C and why it was called C ?? Someone told me this past summer and I was astounded lol


----------



## endian (Aug 11, 2001)

> PS: can anyone tell me who developed C and why it was called C ?? Someone told me this past summer and I was astounded lol



Dennis Kernighan & Brian Ritchie at Bell Labs. The language they were replacing was called B.  

I wonder if there's an Objective-B lol


----------



## endian (Aug 11, 2001)

I should also point out that C++ is a complex, unwieldy, barnacle-encrusted lumbering psychotic swine of a language. Objective-C isn't


----------



## AdmiralAK (Aug 11, 2001)

I have to say that I generally dislike plain onld ANSI C ... I can tolerate it though and that is what matters


----------



## rharder (Aug 13, 2001)

I guess the most efficient language would be assembler. =)

-Rob


----------



## bradleysmith (Aug 13, 2001)

Machine code is the most efficient in terms of runtime speed and the most inefficient in terms of code maintenance 

If God could program he would use C++. I hate Obj C but I may switch my views over the next few months as I use it more. Multiple inheritance and template classes are brilliant. Does Obj C support both of these?

Brad


----------



## rharder (Aug 13, 2001)

> Multiple inheritance and template classes are brilliant.


I'm not familiar with what 'template classes' mean, but multiple inheritance being brilliant is questionable--it's more like bad form, though I admit it can make your life easier at times.

Are template classes like Java interfaces or Obj-C protocols?

-Rob


----------



## ladavacm (Aug 13, 2001)

> _Originally posted by rharder _
> *Are template classes like Java interfaces or Obj-C protocols?
> 
> -Rob *



No, but they are usually used to implement a similar concept in a non-dynamically strongly typed language.  Same can be said about multiple inheritance.

Actually, both parameterized types (templates) and multiple inheritance are more general than either of Java interfaces or objective C protocols; in execution, C++ constructs can be made more efficient (assuming a decent compiler)


----------



## iconara (Aug 19, 2001)

I agree that God would program C++ if he existed. He would prbably be the only one to understand it. To me, C++ is a too complex languages with too many ways of doing the same thing wrong. I personally prefer Java as the _language_ of choice, but I realize that it is not the ideal platform, C++ and ObjC beeing truly compiled languages. Java, however, is a wonderful language, very consistent and rather difficult do make mistakes in. ObjC is comming a long way towards that consistency, dropping some of the more stupid possibilities of C++.

Theo Hultberg / Iconara



Please, don't start a war, I realize I am stepping on some toes here, forgive me.


----------



## free&unmuzzled (Sep 2, 2001)

> _Originally posted by whitesaint _
> *Hey can anybody help me with this? I know alot of Objective C...
> 
> -whitesaint *





> _Originally posted by whitesaint _
> *okay NSString is typically a name right? Like i remember in ResEdit, that the "string" resourse or somthin like that was where are the main stuff was that showed on the screen. yknow if like i had a star wars game, one of the "string" resourse would say "oh chewie shut up", well now in Mac OS X i know how to define the string by:
> 
> NSString *theString
> ...


----------



## whitesaint (Sep 2, 2001)

Hey i do know alot of Objective C, i may not have it perfect yet, but I do need help every once in a while.  Besides im pretty sure the 2nd quote was posted about a month or so before the 1st one thank you very much.

-whitesaint


----------



## free&unmuzzled (Sep 5, 2001)

Sorry, I was being mean (as usual). But since you are starting out, maybe you should say that you know "a litte" Obj C rather than "a lot"?


----------



## werh37 (Sep 6, 2001)

> _Originally posted by bradleysmith _
> *
> If God could program he would use C++.
> 
> Brad *



No way!  He'd use Lisp!


----------



## AdmiralAK (Sep 6, 2001)

Just use NewtonScript damn it 
"Its what java wants to be years before java was even conceived" (endian's quote from somewhere else on this board)

Newton forever!


----------

