转载 2011年10月16日 10:46:28
 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 ofObjective-C 2.0 Essentials we will provide a brief overview of the origins of Objective-C and the business history that ultimately led 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 programming 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 of instruction codes understood by the processor), it was decided that a higher level, more programmer friendly programming language was required to handle the complexity of an operating system such as UNIX. The first attempt was a language calledB. The B language, which was based on a language called BCPL, was found to be lacking. Taking the next initial from theBCPL 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 languages, 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 for a while and talk about business.

In the 1980s Steve Jobs and Steve Wozniak 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 boardroom 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 bookOdyssey: From Pepsi to Apple) leaving John Sculley in charge.

After leaving Apple, Jobs started a new company called NeXT to design an entirely new generation of computer system. The operating system developed by NeXT to run on these computers was called NeXTstep. In order to develop NeXTstep, NeXT licensed Objective-C. NeXT subsequently joined forces with Sun Microsystems 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 named Jean-Louis Gassée, and the other was NeXT.

Ultimately, NeXT was selected and Steve Jobs once again joined Apple. In another boardroom struggle (another long story as outlined in Gil Amelio's bookOn 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.


Objective-C发展历史 苹果图标由来: 被咬了一口苹果的LOGO是为了纪念计算机科学的创始人阿兰· 麦席森· 图灵。当年图灵由于身为同性恋者,被强行 “治疗”,在被迫注射大量雌性激...
  • wanghy_ios
  • wanghy_ios
  • 2015年08月02日 23:44
  • 2602

iOS -- 查看系统版本(objective-c)

我们在写iOS SDK的时候想知道当前手机的系统版本,怎么才能够使用手机系统版本,以下方法可以拿到手机系统版本。 objective-c : [[UIDevice currentDevice].sys...
  • honey199396
  • honey199396
  • 2015年12月13日 19:30
  • 1340


  • sunhangok
  • sunhangok
  • 2012年06月29日 20:42
  • 1108


  • zhuhai__yizhi
  • zhuhai__yizhi
  • 2014年11月06日 16:42
  • 2364


【优点】 1.Category类别 【缺点】 1. 【详解】 【1】.category类别: Category依赖于类,它可以在不改变原有类的基础上,为类增加一些方法。在和别人进行合作的...
  • 2015年10月13日 14:51
  • 2933


[精通Objective-C]块(block)参考书籍:《精通Objective-C》【美】 Keith Lee目录精通Objective-C块block 目录 块的语法 块的词汇范围 块的内存管理 ...
  • sps900608
  • sps900608
  • 2016年07月14日 17:59
  • 2607

在objective-c中, ^ 号 是什么意思

参考:http://bbs.csdn.net/topics/380080540 block 就是一段代码可以写在一个函数里面实现类似函数的功能。 为了方便阅读代码。...
  • liuyan20092009
  • liuyan20092009
  • 2016年08月10日 17:07
  • 294


Objective-C方法与函数的区别 方法是唯对象所有 函数是不依赖于对象存在的 方法 函数 - (void)test; void test(); 方法是以减号 - 开头 - ...
  • q4878802
  • q4878802
  • 2016年01月06日 11:24
  • 3335


一、假如定义下面类两个类: 1.Person类 @interface person : NSObject - (void)eat; + (void)sleep; @end @impleme...
  • SSIrreplaceable
  • SSIrreplaceable
  • 2016年07月07日 22:20
  • 742


Objective-c中的Block(块)详解 在Objective-c中NSArray是很常用的容器之一,很多时候我们需要对数组中的数据进行排序,因此与下面类似的代码会经常碰到:...
  • bboyfeiyu
  • bboyfeiyu
  • 2014年05月08日 11:30
  • 3488