Objective-C的历史

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 business history that ultimately led to it becoming the programming language of choice for both Mac OS X and the iPhone.

Contents

[hide]
The C Programming Language <style type="text/css"> <!-- --> </style>

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

<style type="text/css"> <!-- --> </style>

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Objective-C是苹果公司使用的一种编程语言,用于开发iOS和Mac应用程序。如果你想要学习Objective-C,一本入门教程PDF可能是个不错的资源选择。 Objective-C入门教程PDF会涵盖一些基本概念和语法,帮助你了解Objective-C的基础知识。这样你可以开始编写简单的应用程序,并逐渐深入学习更高级的主题。 一本好的入门教程应该包括以下几个方面的内容: 1. Objective-C历史和基本概述:了解Objective-C的起源和发展,以及它与其他编程语言的区别。 2. 语法和数据类型:学习Objective-C的语法规则,如变量、数据类型、运算符、条件语句等。 3. 对象和类:详细了解Objective-C中的对象和类的概念,包括如何定义和使用它们。 4. 方法和消息传递:了解方法的定义和调用,以及消息传递的机制。 5. 内存管理:学习如何正确地管理内存,避免内存泄露和野指针等问题。 6. 面向对象编程的高级主题:深入学习Objective-C中面向对象编程的高级特性,如继承、多态和封装等。 7. 应用程序开发基础:学习如何使用Objective-C开发iOS和Mac应用程序的基础知识,包括用户界面设计、事件处理和持久化等方面的内容。 当然,入门教程PDF只是一个入门资源,你还需要通过实践编写代码和阅读更多的文档来深入学习Objective-C。建议你在学习的过程中积极动手实践,编写一些简单的应用程序来巩固所学的知识。 除了教程PDF,还有一些其他的学习资源,如在线教程、视频教程和参考文档,都可以帮助你更好地学习Objective-C。希望你能找到一本合适的教程,顺利进入Objective-C的学习之旅!

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值