Whats the Difference?

whitesaint

cocoa love
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
 
<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.
 
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.
 
I just had a question pop up in mu head :p

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 :p
 
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. :D

I wonder if there's an Objective-B lol
 
I should also point out that C++ is a complex, unwieldy, barnacle-encrusted lumbering psychotic swine of a language. Objective-C isn't
 
I have to say that I generally dislike plain onld ANSI C ... I can tolerate it though and that is what matters ;)
 
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
 
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
 
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)
 
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.
 
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

(in the instance variable declaration part of the header file) but if i want a string to say somthing, like "oh chewie shut up" how would i define what "theString" means...?????? All feedback is welcome, appreciated, and thankful. Thanks

-whitesaint


:eek:
 
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:p
 
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"?:cool:
 
Just use NewtonScript damn it :p
"Its what java wants to be years before java was even conceived" (endian's quote from somewhere else on this board)

Newton forever! :D
 
Back
Top