Background of Objective-C

Before we can talk about the details of Objective-C, we need to acknowledge its history. Objective-C is based on a language called simply "C". The C programming language was one of the first highly portable languages. Portable means that the same C code could be compiled to run on any processor as long as someone writes a compiler for that platform. Before that, most of the code was written in Assembly; which always had to be written specifically for each processor it would run on.

C is what is commonly referred to as a procedural programming language. It is built on the concept of a series of functions that call each other. It has a very basic support to create your own types, but it has no built in concept of objects. Objective-C was developed as an object-oriented extension to C. Just as Swift is backwards compatible with Objective-C, Objective-C is backwards compatible with C. Really, it simply adds object-oriented features on top of C with some new syntax and built-in libraries.

The real important thing is that Apple developed their current APIs: Cocoa and Cocoa Touch, for Objective-C. This is one of the biggest reasons why Objective-C is still very relevant to us as Swift developers. Even though we are primarily writing Swift code, we are still going to be regularly interacting with the Cocoa and Cocoa Touch libraries written in Objective-C.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset