Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Objective C Or C++?


9 replies to this topic

#1 random truth

    Member [Level 1]

  • Kontributors
  • PipPipPipPip
  • 51 posts

Posted 01 April 2009 - 03:40 AM

Do any of you here use Objective C? I am debating about learning Objective C or C++. I was wondering, is Objective C more efficient than C++, or what is the advantages of each. So I can make an educated decision.

#2 truefusion

    Coincidence is non-sequitur, therefore everything has a reason for its existence (except if they are eternal).

  • [MODERATOR]
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3,216 posts
  • Gender:Male
  • Location:No, not there. Not there either. Yes, you'll never figure it out.
  • Interests:God, Christianity.
  • myCENT:86.16

Posted 01 April 2009 - 05:30 AM

They say structs and objects are basically the same except that objects allows for private and protected members, et cetera. You'll want to have such a feature if, for example, you were to be working in a group project. Also, C++ allows for overloaded functions. I find these quite convenient and wish that every language had this ability. I've only heard bad things about C++ from C programmers, but from people that teach programming, i've seen more that are for C++. I say go for C++ just for the extra language features.

#3 zakaluka

    Advanced Member

  • Kontributors
  • PipPipPipPipPipPipPip
  • 129 posts

Posted 11 April 2009 - 06:07 AM

I'd say C++ because it is much more widely used. Thanks to this, the number of libraries, tutorials, books and online help is greatly improved over what is available for Objective-C.

Regards,

z.

Edited by zakaluka, 13 April 2009 - 09:57 PM.


#4 sonesay

    |||[ n00b King ]|||

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 958 posts
  • Gender:Male
  • Location:Auckland
  • myCENT:68.27

Posted 11 April 2009 - 07:11 AM

It depends on what you intend to build I guess. I know objective C is used for programming on the OS X. You program OS X applications as well as iPhone applications on it. I have used objective c for a while but have no experience in C or C++ at all. They say Objective C is a superset of C meaning it has all the c functions plus its own.

#5 rpgsearcherz

    Trap Double Mocha Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2,025 posts
  • Gender:Male
  • Interests:Working on my Rift fansite
  • myCENT:56.86
  • Spam Patrol

Posted 11 April 2009 - 07:22 AM

I've never heard of Objective C....Is it just C? Another name for it or is it a new language?

Because if it's just C...I would vote C over C++ anyday if you want full control over how the memory is allocated and whatnot in your programs. C++ is obviously easier to use.

The difference between C and C++ is like a bicycle and car. The bicycle is more efficient(due to workout and all) but is much harder to use.

#6 sonesay

    |||[ n00b King ]|||

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 958 posts
  • Gender:Male
  • Location:Auckland
  • myCENT:68.27

Posted 11 April 2009 - 07:32 AM

objective C is basically C plus more functions built on top of it. You can use c functions as well and objective c functions. That is what a superset of c means.

Edited by sonesay, 11 April 2009 - 07:33 AM.


#7 rpgsearcherz

    Trap Double Mocha Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2,025 posts
  • Gender:Male
  • Interests:Working on my Rift fansite
  • myCENT:56.86
  • Spam Patrol

Posted 11 April 2009 - 08:44 AM

View Postsonesay, on Apr 11 2009, 02:32 AM, said:

objective C is basically C plus more functions built on top of it. You can use c functions as well and objective c functions. That is what a superset of c means.

If all C commands still work as normal C does, it should be fine then...But if it's an "upgraded" version that uses new commands as well as old, it may not have as much control. It'd be just like taking a jump from C++ to C#. C# is much easier to use but C++ has more control. Both can use the same commands though as far as I know. The only diff is in C# you don't have to tell memory locations for arrays and stuff, it's done automatically.

#8 truefusion

    Coincidence is non-sequitur, therefore everything has a reason for its existence (except if they are eternal).

  • [MODERATOR]
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3,216 posts
  • Gender:Male
  • Location:No, not there. Not there either. Yes, you'll never figure it out.
  • Interests:God, Christianity.
  • myCENT:86.16

Posted 11 April 2009 - 04:15 PM

View Postrpgsearcherz, on Apr 11 2009, 04:44 AM, said:

If all C commands still work as normal C does, it should be fine then...But if it's an "upgraded" version that uses new commands as well as old, it may not have as much control. It'd be just like taking a jump from C++ to C#. C# is much easier to use but C++ has more control. Both can use the same commands though as far as I know. The only diff is in C# you don't have to tell memory locations for arrays and stuff, it's done automatically.
C# is like the Microsoft version of Java, so to speak. It may compile to bytecode, but that's not necessarily machine code—you still have to run it through a virtual machine, therefore making C++ programs perform better. Java and C# may be a bit more convenient to program in than C, Objective C or C++, and while the programs made for Java may not require you to recompile your program to be able to use it on another system, i'd still pick C++ over Java and C#. But on the topic of Objective C and C++, both of them are upgraded versions of C, meaning all C programs are basically legal Objective C and C++ programs. C++ used to have the name "C with classes"—not much of an appealing name. I prefer OOP over procedural programming, and coming from a PHP background, the C++ and PHP syntax are quite similar, so i pick C++ over the others.

#9 Diffusr

    Advanced Member

  • Kontributors
  • PipPipPipPipPipPipPip
  • 116 posts

Posted 18 September 2009 - 06:51 PM

C++ is an evolved version of C.
Some experts say that it is good to learn C before C++, others say it's better to go straight to C++. It sounds like it makes sense to learn C first before moving onto C++ because C++ is larger and more extended than C.
C is procedural whereas C++ is object-oriented and the programming is quite different. This is why some experts say it is better to learn C++ without knowing anything about C.

#10 akira550

    Super Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 348 posts
  • Gender:Male
  • Location:Geek Ville
  • myCENT:48.85

Posted 19 September 2009 - 06:28 AM

i'll suggest go to C++  :lol:

you won't regret it




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users