The History of Objective-C

Revision as of 19:15, 14 September 2009 by Neil (Talk | contribs)

Revision as of 19:15, 14 September 2009 by Neil (Talk | contribs)

Before learning the intricacies of a new programming language it is often worth taking a little time to learn about the history and legacy of that language. In this chapter of Objective-C 2.0 Essentials we will provide a brief overview of the origins of Objective-C and the history that ultimately let to it becoming the programming language of choice for both Mac OS X and the iPhone.

The C Programming Language

Objective-C is based on a programing language called, quite simply, C. The origins of the C programming language can be traced back nearly 40 years to two engineers named Dennis Ritchie and Ken Thompson working at what is now known as AT&T Bell Labs. At the time, the two were working on developing the UNIX operating system on PDP-7 and PDP-11 systems. After attempts to write this operating system using assembly language (essentially using sequences instruction codes understood by the processor), it was decided that a higher level, more programmer friendly programming language was required. The first attempt was a language called B. The B language, which was based on a language called BCPL was found to be lacking. Taking the next initial from the BCPL name, the C language was created and subsequently used to write much of the UNIX operating system kernel and infrastructure. As far as we can tell, C was so successful that new languages named P and L never needed to be created.

The Smalltalk programming Language

The C programming language is what is known as a procedural language. As such, this means that it lacks features such as object oriented programming. Object oriented programming advocates the creation of small, clearly defined code objects that can be assembled and reused to create more complex systems.

An early attempt at an object-oriented programming language was developed by a team including Alan Kay (who later went to work for Apple) and Dan Ingalls at Xerox PARC (Palo Alto Research Center) in the 1970s. This language is known as Smalltalk.


C meets Smalltalk

An interesting history lesson so far, but what does this have to with Objective-C? Well, in the 1980s, two developers named Brad Cox and Tom Love extended the C programming language to support the object oriented features of Smalltalk. This melding of languages ultimately culminated in the creation of Objective-C. Objective-C was subsequently adopted by the Free Software Foundation and released under the terms of the GNU Public License (GPL).

Objective-C and Apple

To understand how Objective-C, a language based on two 40 year old programming languges, ended up being the language of choice on Mac OS X and the latest cutting edge smartphones from Apple it is necessary to move away from technology and talk about business.

In the 1980s Steve Jobs and Steve Wozniac founded Apple Computer. After many years of success, Steve Jobs hired a marketing wizard from PepsiCo called John Sculley to help take Apple to the next level of business success. To cut a long story short, a boradroom battle ensued and Steve Jobs got pushed out of the company (for the long version of the story pick up a used copy of John Sculley's book Odyssey: From Pepsi to Apple).

After leaving Apple, Jobs started a new company called NeXT Computer to design an entirely new generation of computer system. The operating system developed by NeXT to run on these computers was called NeXTStep. NeXTstep was, in turn, developed using Objective-C. NeXT subsequently joined forces with Sun Microsystems (now part of Oracle) to create a standardized version of NeXTstep named OPENstep which the Free Software Foundation then adopted as GNUstep.

During the 1990s, John Sculley left Apple and a procession of new CEOs came and went. During this time, Apple had been losing market share and struggling to come out with a new operating system to replace the aging MacOS. After a number of failed attempts and partnerships, it was eventually decided that rather than try to write a new operating system, Apple should acquire a company that already had one. During Gil Amelio's brief reign as CEO, a shortlist of two companies was drawn up. One was a company called Be, Inc. founded by a former Apple employee, and the other being NeXT. Ultimately, NeXT was selected and Steve Jobs once again joined Apple. In another boardroom struggle (another long story outlined in Gil Amemio's book On the Firing Line. My 500 Days at Apple) Steve Jobs pushed out Gil Amelio and once again became CEO of the company he had founded all those years ago.

The rest, as they say, is history. NeXTStep formed the foundation of what became Mac OS X, bringing with it Objective-C. Mac OS X was subsequently modified to provide the operating system for the spectacularly successful iPhone.