When students enter the world of programming for the first time, most wonder which language to start learning first. There are several languages out there (like Perl, C++ and Java) that seem as good as, and as confusing as, the rest. Even if you are a programming newbie, you have probably heard about C and Objective C- two languages that are among the most popular programming languages at the moment. You might know that these two languages are related, and learning one can be a precursor to learning the other. So which language should you learn first? Should you bother learning one if you know the other? Vexing questions indeed! Someone might have told you to learn C first, while others would have recommended learning Objective C first and picking up C concepts as you go along, if needed. Both of these schools of thought are valid, but only you can decide what is right for you. In this article, we’ve outlined the major conceptual differences (and similarities) between C and Objective C. Once you know more about the languages, and their differences, you can decide which one is more suited to your needs. If you’d like to jump ahead and get your feet wet, you can take this cour
se to learn more about C programming, and this course for some hands on Objective C programming.
The C Language
C was developed in 1969 by Dennis Ritchie. It was a language far ahead of its time. While initially the language was designed to enable the implementation of software on a system, it evolved greatly from that basic use. Today, the language is one of the most used programming languages in the world. Several operating systems, like Windows, are written in C. It is also used to write applications and create GUIs. The language, despite its age, remains one of the most efficient programming languages in the world. C is what you call a low level programming language. The language code is similar to code you use to get processors working (machine level code). Because of this, programs written in C execute very fast. C is also what you call a procedural language. If you are familiar with modern programming languages like Java, you know that most of them are object oriented. C, unlike these languages, is procedural. What does that mean exactly? Programming tasks in C are carried out in a step by step manner. These steps are bound together in functions. Functions form the basics of procedural programming. Functions can be reused. The emphasis is on the programming task to be carried out, and the data being used is secondary. C is sometimes called the “father” of modern programming languages. This is because the language has influenced almost all the modern programming languages (like Perl, Java, C++, Python, Ruby, among many others) to a certain extent. Many of the most popular applications in the world are written in C. The language is also supported on almost all system architectures in the world. You will also find it easier to learn other day modern programming languages if you know C already. If you want to learn more about C, take this in depth C programming course. One major advantage that C has over Objective C is that it is lighter and programs take up a smaller execution and memory footprint.
Objective C is a high level programming language. The language was designed in the 1980s, when two independent programmers Brad Cox and Tom Love felt the need to improve on C. C, as we discussed earlier, is a procedural language. They decided to make changes to the language so that it could support object oriented programming, and some other features found in Smalltalk like messaging. Object oriented programming refers to the practice of treating a programming task as a collection of small tasks. The emphasis is not so much on the means of getting the task done as it is on the data (or objects) being used to perform the task. The program revolves around the objects- similar objects and methods (tasks performed on the objects) are grouped together in what you call classes. This makes it easier to develop small modules (a collection of objects and methods), which can undertake a portion of the task. Modules, like functions, are reusable. You can use modules developed by other people as well. Objective C supports the concept of inheritance (though not multiple inheritance), polymorphism and data abstraction- something that C is lacking. Objective C lets you declare classes- blueprints for your objects, which makes it easier to write structured programs. Objective C is a “superset” of C. Everything you find in C, you find in Objective C. However, Objective C also has an object oriented layer and some other basic features that make it stand out from C. Objective C lets you follow both the procedural as well as the object oriented style of programming. Small tasks are almost always easier with procedural programming, while large tasks are easier with object oriented programming. You can use programs developed for C in Objective C with little to no modifications. At present, Objective C is the language that is used to develop Apple’s iOS operating systems, as well as OS X systems. Applications developed for iTunes use Objective C to some extent to the other. If you are interested in developing applications for iTunes, you will have to learn Objective C. Objective C syntax, in some ways, is better organized and easier to remember than C syntax. However, it is derived from the C syntax to a large extent. If you choose to learn Objective C first, you will be able to learn C quickly later. You can sign up for this Objective C course to learn the language quickly. We teach you everything you need to know to become a good Objective C programmer.