Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,152 members, 7,818,477 topics. Date: Sunday, 05 May 2024 at 04:51 PM

Any Huge Differences Between Objective-c And Regular C? - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Any Huge Differences Between Objective-c And Regular C? (1369 Views)

I Need A Very Good Java, C++ And Android Developer For A Big Project / Who Will Teach Me C And C++ Programming Language From The Scratch ? / Help A Friend To Learn Java, Php, C#, C And C++ (2) (3) (4)

(1) (Reply) (Go Down)

Any Huge Differences Between Objective-c And Regular C? by Fulaman198(m): 6:34am On Jan 17, 2016
Calling all the C unsung heroes: ChinenyeN, Dekatron, Crotonite, etc. etc.

I am about to familiarise myself with Objective-C in order to commence projects in iOS development. I wanted to know if there are any significant language differences between Objective-C and C. Thanks in advance my friends.
Re: Any Huge Differences Between Objective-c And Regular C? by ANTONINEUTRON(m): 9:07am On Jan 17, 2016
C is a low-level language used for writing OS and Embedded Systems and It's more closer to the machine.

I don't know much about Objective-C; but i know that it's a language created for Mac OSX, for its app creation.

2 Likes

Re: Any Huge Differences Between Objective-c And Regular C? by Fulaman198(m): 9:13am On Jan 17, 2016
ANTONINEUTRON:
C is a low-level language used for writing OS and Embedded Systems and It's more closer to the machine.

I don't know much about Objective-C; but i know that it's a language created for Mac OSX, for its app creation.

You are correct young Jedi
Re: Any Huge Differences Between Objective-c And Regular C? by ANTONINEUTRON(m): 9:15am On Jan 17, 2016
Fulaman198:

You are correct young Jedi
tanx

1 Like

Re: Any Huge Differences Between Objective-c And Regular C? by Fulaman198(m): 9:51am On Jan 17, 2016
ANTONINEUTRON:
tanx

No problem little bro
Re: Any Huge Differences Between Objective-c And Regular C? by DonSegmond(m): 1:20pm On Jan 17, 2016
Fulaman198:
Calling all the C unsung heroes: ChinenyeN, Dekatron, Crotonite, etc. etc.

I am about to familiarise myself with Objective-C in order to commence projects in iOS development. I wanted to know if there are any significant language differences between Objective-C and C. Thanks in advance my friends.
Yes, there is a significant difference.
C was created in the 70's for system programming. It was designed for writing Operating Systems and Systems Program, you know command line programs all text. It sufficed and did that job quite well, some might argue that it has changed/grown a bit, but I do wager the reverse that it hasn't changed that much since the ANSI standards was developed. It's simply a procedural language like pascal.

Objective C was created for NeXT OS. It was modelled after small talk and is an Object oriented language built on top of C, so we can say that it is a superset of C. all valid C programs will compile in Objective C, but of course not all Objective C will compile with C. With this knowledge, if you wish to learn Objective C, then I urge you not to use a C tutorial but an Objective C tutorial. If you likewise have to learn C, you don't need to, an objective C tutorial will be more than enough.

Objective C has objects, C doesn't. The closed thing C for grouping objects is structures and unions, and those cannot have their own methods, unless you place a pointer to a function inside of it.

Once you build objects in ObjC, you invoke them with message passing. using the [] syntax which doesn't exist in C.
By having objects, ObjC provides for extended classes, abstract classes, interface, multiple inheritance.

Methods are defined different


C

float function sqr_root(int num) {
return square_root(num);
}

Obj C

+ (float)sqr_rootsadint) num {
return [self square_root:num];
}



P/S, I will urge you to learn swift instead. It will be a better investment of your time unless someone is going to be paying you to write ObjC code soon. Best of luck.

2 Likes

Re: Any Huge Differences Between Objective-c And Regular C? by ChinenyeN(m): 10:51pm On Jan 17, 2016
I'm not familiar with Swift or Objective C, but from what I hear, you should use Swift if your objective is to develop for iOS.

1 Like

Re: Any Huge Differences Between Objective-c And Regular C? by Fulaman198(m): 9:01am On Jan 18, 2016
Thanks Gents.
Re: Any Huge Differences Between Objective-c And Regular C? by seunthomas: 4:51pm On Jan 18, 2016
objective c is closer to c++ than c. Although you can write objective c like c just like you can write c++ like c. objective c is also closer to the hardware and highly optimized and just like c++ it has high level libraries but like c++ you can decide to get dirty and use the c like part.

1 Like

(1) (Reply)

Learn Html Css Sql Php C++ Javascript Java Free Withing 1 Month / Java: Can I Create A Java App Without Ide / How To Make Money In Dollars Or Pounds In Nigeria.

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 19
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.