Object的起源

Terminology invoking "objects" and "oriented" in the modern sense of object-oriented programming made its first appearance at MIT in the late 1950s and early 1960s. In the environment of the artificial intelligence group, as early as 1960, "object" could refer to identified items ( LISP atoms) with properties (attributes); [10][11] Alan Kay was later to cite a detailed understanding of LISP internals as a strong influence on his thinking in 1966. [12]

I thought of objects being like biological cells and/or individual computers on a network, only able to communicate with messages (so messaging came at the very beginning -- it took a while to see how to do messaging in a programming language efficiently enough to be useful).

Alan Kay, [12]

Another early MIT example was Sketchpad created by Ivan Sutherland in 1960–61; in the glossary of the 1963 technical report based on his dissertation about Sketchpad, Sutherland defined notions of "object" and "instance" (with the class concept covered by "master" or "definition"), albeit specialized to graphical interaction. [13] Also, an MIT ALGOL version, AED-0, established a direct link between data structures ("plexes", in that dialect) and procedures, prefiguring what were later termed "messages", "methods", and "member functions". [14] [15]

In the 1960s, object-orientated programming was put into practice with the Simula language, which introduced important concepts that are today an essential part of object-orientated programming, such as class and object , inheritance, and dynamic binding . [16] Simula was also designed to take account of programming and data security . For programming security purposes a detection process was implemented so that through reference counts a last resort garbage collector deleted unused objects in the random-access memory (RAM). But although the idea of data objects had already been established by 1965, data encapsulation throughlevels of scope for variables , such as private (-) and public (+), were not implemented in Simula because it would have required the accessing procedures to be also hidden. [17]

In 1962, Kristen Nygaard initiated a project for a simulation language at the Norwegian Computing Center , based on his previous use of the Monte Carlo simulationand his work to conceptualise real-world systems. Ole-Johan Dahl formally joined the project and the Simula programming language was designed to run on the Universal Automatic Computer (UNIVAC) 1107. In the early stages Simula was supposed to be a procedure package for the programming language ALGOL 60. Dissatisfied with the restrictions imposed by ALGOL the researchers decided to develop Simula into a fully-fledged programming language, which used the UNIVAC ALGOL 60 compiler. Simula launched in 1964, and was promoted by Dahl and Nygaard throughout 1965 and 1966, leading to increasing use of the programming language in Sweden, Germany and the Soviet Union . In 1968, the language became widely available through the Burroughs B5500 computers , and was later also implemented on the URAL-16 computer . In 1966, Dahl and Nygaard wrote a Simula compiler . They became preoccupied with putting into practice Tony Hoare 's record class concept, which had been implemented in the free-form, English-like general-purpose simulation language SIMSCRIPT . They settled for a generalised process concept with record class properties, and a second layer of prefixes. Through prefixing a process could reference its predecessor and have additional properties. Simula thus introduced the class and subclass hierarchy, and the possibility of generating objects from these classes. The Simula 1 compiler and a new version of the programming language, Simula 67, was introduced to the wider world through the research paper "Class and Subclass Declarations" at a 1967 conference. [18]

A Simula 67 compiler was launched for the System/360 and System/370 IBM mainframe computers in 1972. In the same year a Simula 67 compiler was launched free of charge for the French CII 10070 and CII Iris 80 mainframe computers . By 1974, the Association of Simula Users had members in 23 different countries. Early 1975 a Simula 67 compiler was released free of charge for the DecSystem-10 mainframe family. By August the same year the DecSystem Simula 67 compiler had been installed at 28 sites, 22 of them in North America. The object-orientated Simula programming language was used mainly by researchers involved with physical modelling , such as models to study and improve the movement of ships and their content through cargo ports.[19]

In the 1970s, the first version of the Smalltalk programming language was developed at Xerox PARC by Alan Kay , Dan Ingalls and Adele Goldberg . Smaltalk-72 included a programming environment and was dynamically typed , and at first was interpreted , not compiled . Smalltalk got noted for its application of object orientation at the language level and its graphical development environment. Smalltalk went through various versions and interest in the language grew. [20] While Smalltalk was influenced by the ideas introduced in Simula 67 it was designed to be a fully dynamic system in which classes could be created and modified dynamically. [21]

In the 1970s, Smalltalk influenced the Lisp community to incorporate object-based techniques that were introduced to developers via the Lisp machine . Experimentation with various extensions to Lisp (such as LOOPS and Flavors introducing multiple inheritance and mixins ) eventually led to the Common Lisp Object System , which integrates functional programming and object-oriented programming and allows extension via a Meta-object protocol . In the 1980s, there were a few attempts to design processor architectures that included hardware support for objects in memory but these were not successful. Examples include the Intel iAPX 432 and the Linn Smart Rekursiv .

In 1981, Goldberg edited the August 1981 issue of Byte Magazine , introducing Smalltalk and object-orientated programming to a wider audience. In 1986, the Association for Computing Machinery organised the first Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), which was unexpectedly attended by 1,000 people. In the mid-1980s Objective-C was developed by Brad Cox , who had used Smalltalk at ITT Inc. , and Bjarne Stroustrup , who had used Simula for his PhD thesis, eventually went to create the object-orientated C++ . [20] In 1985, Bertrand Meyer also produced the first design of the Eiffel language . Focused on software quality, Eiffel is a purely object-oriented programming language and a notation supporting the entire software lifecycle. Meyer described the Eiffel software development method, based on a small number of key ideas from software engineering and computer science, in Object-Oriented Software Construction . Essential to the quality focus of Eiffel is Meyer's reliability mechanism, Design by Contract , which is an integral part of both the method and language.

 
The TIOBE programming language popularity indexgraph from 2002 to 2018. In the 2000s the object-orientated Java (blue) and the procedural C (black) competed for the top position.

In the early and mid-1990s object-oriented programming developed as the dominant programming paradigm when programming languages supporting the techniques became widely available. These included Visual FoxPro 3.0, [22] [23] [24] C++ , [25] and Delphicitation needed ] . Its dominance was further enhanced by the rising popularity of graphical user interfaces , which rely heavily upon object-oriented programming techniques. An example of a closely related dynamic GUI library and OOP language can be found in the Cocoa frameworks on Mac OS X , written in Objective-C , an object-oriented, dynamic messaging extension to C based on Smalltalk.OOP toolkits also enhanced the popularity of event-driven programming (although this concept is not limited to OOP).

At ETH Zürich , Niklaus Wirth and his colleagues had also been investigating such topics as data abstraction and modular programming(although this had been in common use in the 1960s or earlier). Modula-2 (1978) included both, and their succeeding design, Oberon , included a distinctive approach to object orientation, classes, and such.

Object-oriented features have been added to many previously existing languages, including Ada , BASIC , Fortran , Pascal , and COBOL .Adding these features to languages that were not initially designed for them often led to problems with compatibility and maintainabilhttps://translate.google.com.hk/translate?hl=zh-CN&sl=en&tl=zh-CN&u=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FObject-oriented_programming&anno=2ity of code.

More recently, a number of languages have emerged that are primarily object-oriented, but that are also compatible with procedural methodology. Two such languages are Python and Ruby .Probably the most commercially important recent object-oriented languages are Java , developed by Sun Microsystems , as well as C# and Visual Basic.NET (VB.NET), both designed for Microsoft's .NET platform. Each of these two frameworks shows, in its own way, the benefit of using OOP by creating an abstraction from implementation. VB.NET and C# support cross-language inheritance, allowing classes defined in one language to subclass classes defined in the other language.

来自维基:https://translate.google.com.hk/translate?hl=zh-CN&sl=en&tl=zh-CN&u=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FObject-oriented_programming&anno=2

面向对象程序设计的雏形,早在1960年的Simula语言中即可发现,当时的程序设计领域正面临着一种危机:在软硬件环境逐渐复杂的情况下,软件如何得到良好的维护?面向对象程序设计在某种程度上通过强调可重复性解决了这一问题。20世纪70年代的Smalltalk语言在面向对象方面堪称经典——以至于30年后的今天依然将这一语言视为面向对象语言的基础。

计算机科学中对象和实例概念的最早萌芽可以追溯到麻省理工学院PDP-1系统。这一系统大概是最早的基于容量架构(capability based architecture)的实际系统。另外1963年Ivan Sutherland的Sketchpad应用中也蕴含了同样的思想。对象作为编程实体最早是于1960年代由Simula 67语言引入思维。Simula这一语言是奥利-约翰·达尔克利斯登·奈加特在挪威奥斯陆计算机中心为模拟环境而设计的。(据说,他们是为了模拟船只而设计的这种语言,并且对不同船只间属性的相互影响感兴趣。他们将不同的船只归纳为不同的类,而每一个对象,基于它的类,可以定义它自己的属性和行为。)这种办法是分析式程序的最早概念体现。在分析式程序中,我们将真实世界的对象映射到抽象的对象,这叫做“模拟”。Simula不仅引入了“类”的概念,还应用了实例这一思想——这可能是这些概念的最早应用。

20世纪70年代施乐PARC研究所发明的Smalltalk语言将面向对象程序设计的概念定义为,在基础运算中,对对象消息的广泛应用。Smalltalk的创建者深受Simula 67的主要思想影响,但Smalltalk中的对象是完全动态的——它们可以被创建、修改并销毁,这与Simula中的静态对象有所区别。此外,Smalltalk还引入了继承性的思想,它因此一举超越了不可创建实例的程序设计模型和不具备继承性的Simula。此外,Simula 67的思想亦被应用在许多不同的语言,如LispPascal

面向对象程序设计在80年代成为了一种主导思想,这主要应归功于C++——C语言的扩充版。在图形用户界面(GUI)日渐崛起的情况下,面向对象程序设计很好地适应了潮流。GUI和面向对象程序设计的紧密关联在Mac OS X中可见一斑。Mac OS X是由Objective-C语言写成的,这一语言是一个仿Smalltalk的C语言扩充版。面向对象程序设计的思想也使事件处理式的程序设计更加广泛被应用(虽然这一概念并非仅存在于面向对象程序设计)。一种说法是,GUI的引入极大地推动了面向对象程序设计的发展。

苏黎世联邦理工学院的尼克劳斯·维尔特和他的同事们对抽象数据和模块化程序设计进行了研究。Modula-2将这些都包括了进去,而Oberon则包括了一种特殊的面向对象方法——不同于SmalltalkC++

面向对象的特性也被加入了当时较为流行的语言:AdaBASICLispFortranPascal以及种种。由于这些语言最初并没有面向对象的设计,故而这种糅合常常会导致兼容性和维护性的问题。与之相反的是,“纯正的”面向对象语言却缺乏一些程序员们赖以生存的特性。在这一大环境下,开发新的语言成为了当务之急。作为先行者,Eiffel成功地解决了这些问题,并成为了当时较受欢迎的语言。

在过去的几年中,Java语言成为了广为应用的语言,除了它与CC++语法上的近似性。Java的可移植性是它的成功中不可磨灭的一步,因为这一特性,已吸引了庞大的程序员群的投入。

在最近的计算机语言发展中,一些既支持面向对象程序设计,又支持面向过程程序设计的语言悄然浮出水面。它们中的佼佼者有PythonRuby等等。

正如面向过程程序设计使得结构化程序设计的技术得以提升,现代的面向对象程序设计方法使得对设计模式的用途、契约式设计建模语言(如UML)技术也得到了一定提升。

来自维基:https://zh.wikipedia.org/wiki/%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1

原文地址:https://www.cnblogs.com/kazama/p/9940858.html