Object-oriented programming: Difference between revisions

Content deleted Content added
m History: Fixed a journal sfn link
History: revise a bit, make it more chronological
Line 20:
[[File:oop-uml-class-example.png|frame|right|[[Unified Modeling Language|UML]] notation for a class. This Button class has [[Variable (computer science)|variables]] for data, and [[Method (computer programming)|functions]]. Through inheritance a subclass can be created as subset of the Button class. Objects are instances of a class.]]
 
Terminology invoking "objects" in the modern sense of object-oriented programming made its first appearance at the [[artificial intelligence]] group at [[MIT]] in the late 1950s and early 1960s. In the environment of the [[artificial intelligence]] group, as early as 1960, "objectObject" could referreferred to identified items ([[Lisp (programming language)|LISP]] atoms) with identified properties (attributes);.<ref>{{Cite journal |last1=McCarthy |first1=J. |last2=Brayton |first2=R. |author2-link=Robert Brayton (computer scientist) |last3=Edwards |first3=D. |author3-link=Daniel Edwards (programmer) |last4=Fox |first4=P. |author4-link=Phyllis Fox |last5=Hodes |first5=L. |author5-link=Louis Hodes |last6=Luckham |first6=D. |author6-link=David Luckham |last7=Maling |first7=K. |author7-link=Klim Maling (programmer) |last8=Park |first8=D. |author8-link=David Park (computer scientist) |last9=Russell |first9=S. |author9-link=Steve Russell (computer scientist) |date=March 1969 |title=LISP I Programmers Manual |url=http://history.siam.org/sup/Fox_1960_LISP.pdf |url-status=dead |journal=Computation Center and Research Laboratory of Electronics |publisher=Artificial Intelligence Group, [[M.I.T. Computation Center]] and Research Laboratory |page=88f |archive-url=https://web.archive.org/web/20100717111134/http://history.siam.org/sup/Fox_1960_LISP.pdf |archive-date=17 July 2010 |quote=In the local M.I.T. patois, association lists [of atomic symbols] are also referred to as "property lists", and atomic symbols are sometimes called "objects". |place=[[Boston]], [[Massachusetts]]}}</ref><ref>{{Cite book
|url = https://archive.org/details/lisp15programmer00john/page/105
|title = LISP 1.5 Programmer's Manual
Line 41:
|quote = Object&nbsp;— a synonym for atomic symbol
|df = dmy-all
}}</ref> Another early MIT example was [[Sketchpad]] created by [[Ivan Sutherland]] in 1960–1961; 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.<ref>{{Cite web|url=http://handle.dtic.mil/100.2/AD404549|archive-url=https://web.archive.org/web/20130408133119/http://handle.dtic.mil/100.2/AD404549|url-status=dead|archive-date=8 April 2013|title=Sketchpad: A Man-Machine Graphical Communication System|author=Sutherland, I. E.|date=30 January 1963|publisher=Technical Report No. 296, Lincoln Laboratory, Massachusetts Institute of Technology via Defense Technical Information Center (stinet.dtic.mil)|access-date=17 July 2019}}<!-- Seems to be fixed --></ref> Also, in 1968, 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".<ref name=simuladev>The Development of the Simula Languages,
}}</ref>
[[Alan Kay]] later cited a detailed understanding of LISP internals as a strong influence on his thinking in 1966, and that he used the term "object-oriented programming" in conversation as early as 1967.<ref name=alanKayOnOO/> Although sometimes called "the father of object-oriented programming",<ref>{{cite book |last1=Butcher |first1=Paul |title=Seven Concurrency Models in Seven Weeks: When Threads Unravel |date=30 June 2014 |publisher=Pragmatic Bookshelf |isbn=978-1-68050-466-8 |page=204 |url=https://books.google.com/books?id=Xg9QDwAAQBAJ&pg=PT204 |language=en}}</ref> Alan Kay has differentiated his notion of OO from the more conventional [[abstract data type]] notion of object, and has implied that the computer science establishment did not adopt his notion.<ref name=alanKayOnOO>{{Cite web|url= http://www.purl.org/stefan_ram/pub/doc_kay_oop_en |title=Dr. Alan Kay on the Meaning of "Object-Oriented Programming" |year= 2003|access-date=11 February 2010}}</ref> A 1976 MIT memo co-authored by [[Barbara Liskov]] lists [[Simula 67]], [[CLU (programming language)|CLU]], and [[Alphard (programming language)|Alphard]] as object-oriented languages, but does not mention Smalltalk.<ref>{{cite tech report |last=Jones |first=Anita K. |last2=Liskov|first2=Barbara H. |date=April 1976 |title=An Access Control Facility for Programming Languages |institution=MIT |number=CSG Memo 137|url=http://csg.csail.mit.edu/CSGArchives/memos/Memo-137.pdf }}</ref>
 
{{Quote box
|quote = 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).
|author = Alan Kay
|source =<ref name=alanKayOnOO />
|width = 50%
}}
 
Another early MIT example was [[Sketchpad]] created by [[Ivan Sutherland]] in 1960–1961; 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.<ref>{{Cite web|url=http://handle.dtic.mil/100.2/AD404549|archive-url=https://web.archive.org/web/20130408133119/http://handle.dtic.mil/100.2/AD404549|url-status=dead|archive-date=8 April 2013|title=Sketchpad: A Man-Machine Graphical Communication System|author=Sutherland, I. E.|date=30 January 1963|publisher=Technical Report No. 296, Lincoln Laboratory, Massachusetts Institute of Technology via Defense Technical Information Center (stinet.dtic.mil)|access-date=17 July 2019}}<!-- Seems to be fixed --></ref>
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".<ref name=simuladev>The Development of the Simula Languages,
[[Kristen Nygaard]], [[Ole-Johan Dahl]],
p.254
Line 63 ⟶ 52:
|url = http://www.csail.mit.edu/timeline/timeline.php?query=event&id=19
|access-date =13 May 2010 }}
</ref> Topics as [[data abstraction]] and [[modularity (programming)|modular programming]] were common points of discussion at this time.
</ref>
 
Independently of later MIT work such as AED, [[Simula]] was developed during the years 1961-1967.<ref name=simuladev/> Simula introduced important concepts that are today an essential part of object-oriented programming, such as [[Class (computer programming)|class]] and [[Object (computer science)|object]], inheritance, and [[Dynamic binding (computing)|dynamic binding]].<ref name="auto">{{Cite journal|last = Holmevik|first = Jan Rune|title = Compiling Simula: A historical study of technological genesis|journal = IEEE Annals of the History of Computing|volume = 16|issue = 4|pages = 25–37|year = 1994|url = http://www.idi.ntnu.no/grupper/su/publ/simula/holmevik-simula-ieeeannals94.pdf|doi = 10.1109/85.329756|s2cid = 18148999|access-date = 3 March 2018|archive-date = 30 August 2017|archive-url = https://web.archive.org/web/20170830065454/http://www.idi.ntnu.no/grupper/su/publ/simula/holmevik-simula-ieeeannals94.pdf|url-status = dead}}</ref> The object-oriented 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.<ref name="auto"/>
 
{{Quote box
|quote = 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).
|author = Alan Kay
|source =<ref name=alanKayOnOO />
|width = 50%
}}
 
[[AlanInfluenced Kay]]by laterthe citedwork aat detailedMIT understandingand ofthe LISPSimula internalslanguage, asin aNovember strong1966 [[Alan Kay]] began influenceworking on hisideas thinkingthat inwould 1966,eventually andbe thatincorporated he the [[Smalltalk]] programming language. Kay used the term "object-oriented programming" in conversation as early as 1967.<ref name=alanKayOnOO/> Although sometimes called "the father of object-oriented programming",<ref>{{cite book |last1=Butcher |first1=Paul |title=Seven Concurrency Models in Seven Weeks: When Threads Unravel |date=30 June 2014 |publisher=Pragmatic Bookshelf |isbn=978-1-68050-466-8 |page=204 |url=https://books.google.com/books?id=Xg9QDwAAQBAJ&pg=PT204 |language=en}}</ref> Alan Kay has differentiated his notion of OO from the more conventional [[abstract data type]] notion of object, and has implied that the computer science establishment did not adopt his notion.<ref name=alanKayOnOO>{{Cite web|url= http://www.purl.org/stefan_ram/pub/doc_kay_oop_en |title=Dr. Alan Kay on the Meaning of "Object-Oriented Programming" |year= 2003|access-date=11 February 2010}}</ref> A 1976 MIT memo co-authored by [[Barbara Liskov]] lists [[Simula 67]], [[CLU (programming language)|CLU]], and [[Alphard (programming language)|Alphard]] as object-oriented languages, but does not mention Smalltalk.<ref>{{cite tech report |last=Jones |first=Anita K. |last2=Liskov|first2=Barbara H. |date=April 1976 |title=An Access Control Facility for Programming Languages |institution=MIT |number=CSG Memo 137|url=http://csg.csail.mit.edu/CSGArchives/memos/Memo-137.pdf }}</ref>
[[Simula]] introduced important concepts that are today an essential part of object-oriented programming, such as [[Class (computer programming)|class]] and [[Object (computer science)|object]], inheritance, and [[Dynamic binding (computing)|dynamic binding]].<ref name="auto">{{Cite journal|last = Holmevik|first = Jan Rune|title = Compiling Simula: A historical study of technological genesis|journal = IEEE Annals of the History of Computing|volume = 16|issue = 4|pages = 25–37|year = 1994|url = http://www.idi.ntnu.no/grupper/su/publ/simula/holmevik-simula-ieeeannals94.pdf|doi = 10.1109/85.329756|s2cid = 18148999|access-date = 3 March 2018|archive-date = 30 August 2017|archive-url = https://web.archive.org/web/20170830065454/http://www.idi.ntnu.no/grupper/su/publ/simula/holmevik-simula-ieeeannals94.pdf|url-status = dead}}</ref>
The object-oriented 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.<ref name="auto"/>
 
In the 1970s, the first version of the [[Smalltalk]] programming language was developed at [[Xerox PARC]] by [[Alan Kay]], [[Dan Ingalls]] and [[Adele Goldberg (computer scientist)|Adele Goldberg]]. Smalltalk-72 included a programming environment and was [[Dynamic programming|dynamically typed]], and at first was [[Interpreter (computing)|interpreted]], not [[Compiler|compiled]]. Smalltalk became 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.<ref name="Bertrand Meyer 2009 329">{{Cite book|title=Touch of Class: Learning to Program Well with Objects and Contracts|author=Bertrand Meyer|publisher=Springer Science & Business Media|year=2009|isbn=978-3-540-92144-8|pages=329|bibcode=2009tclp.book.....M}}</ref> 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.<ref name="st">{{Cite web|first=Alan |last=Kay |url=http://gagne.homedns.org/~tgagne/contrib/EarlyHistoryST.html |title=The Early History of Smalltalk |access-date=13 September 2007 |url-status=dead |archive-url=https://web.archive.org/web/20080710144930/http://gagne.homedns.org/~tgagne/contrib/EarlyHistoryST.html |archive-date=10 July 2008 }}</ref>
 
InDuring the late 1970s and 1980s, Smalltalkobject-oriented influencedprogramming therose to prominence. The [[LispFlavors (programming language)#Language innovations|Flavors]] object-oriented Lisp communitywas developed starting 1979, introducing [[multiple inheritance]] to incorporateand [[Lispmixins]].<ref>{{cite (programmingconference language)#|last1=Moon |first1=David A. |author-link1=David A. Moon |date=June 1986 |title=Object-Oriented Programming with Flavors systems|objectbook-basedtitle=Conference techniquesproceedings on Object-oriented Programming Systems Languages and Applications |pages=1–8 |isbn=978-0-89791-204-4 |conference=[[OOPSLA]] that'86 were|doi=10.1145/28697.28698 introduced|s2cid=17150741 to|url=https://www.cs.tufts.edu/comp/150FP/archive/david-moon/flavors.pdf developers|access-date=2022-03-17}}</ref> viaIn 1981, Goldberg edited the August issue of [[LispByte machineMagazine]], introducing Smalltalk and object-oriented programming to a wide audience.<ref>{{cncite news |reasontitle=TheIntroducing datesthe don'tSmalltalk lineZoo up,|url=https://computerhistory.org/blog/introducing-the-smalltalk-zoo-48-years-of-smalltalk-history-at-chm/ Flavors|work=CHM is|date=17 1982December and2020 |language=en}}</ref> LOOPS, isthe 1983object sosystem theyfor were[[Interlisp]]-D, most likelywas influenced by Smalltalk-80|date=August 2023}}and ExperimentationFlavors, withand variousa extensionspaper toabout Lispit (suchwas aspublished in 1982.<ref>{{cite conference | title=LOOPS: data and [[Flavorsobject (programmingoriented language)Programming for Interlisp|Flavors]]date=1982|conference=European introducingAI Conference|last1=Bobrow|first1=D. G.|last2=Stefik|first2=M. J|url=https://www.markstefik.com/wp-content/uploads/2011/04/1982-Bobrow-Stefik-Data-Object-Pgming.pdf}}</ref> In 1986, the [[multipleAssociation inheritancefor Computing Machinery]] organised the first ''Conference on Object-Oriented Programming, Systems, Languages, and [[mixins]]Applications'' (OOPSLA), eventuallywhich ledwas toattended by 1,000 people. Among other developments was 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 Products|Linn Smart]] [[Rekursiv]].
 
In 1981, Goldberg edited the August issue of [[Byte Magazine]], introducing Smalltalk and object-oriented 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.]]. [[Bjarne Stroustrup]], who had used Simula for his PhD thesis, created the object-oriented [[C++]].<ref name="Bertrand Meyer 2009 329"/> In 1985, [[Bertrand Meyer]] also produced the first design of the [[Eiffel (programming language)|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.
 
[[File:Tiobeindex.png|thumb|350px|The [[TIOBE index|TIOBE]] programming language popularity index graph from 2002 to 2023. In the 2000s the object-oriented [[Java (programming language)|Java]] (orange) and the [[Procedural programming|procedural]] [[C (programming language)|C]] (dark blue) 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,<ref>1995 (June) Visual [[FoxPro]] 3.0, FoxPro evolves from a procedural language to an object-oriented language. Visual FoxPro 3.0 introduces a database container, seamless client/server capabilities, support for ActiveX technologies, and OLE Automation and null support. [http://www.foxprohistory.org/foxprotimeline.htm#summary_of_fox_releases Summary of Fox releases]</ref><ref>FoxPro History web site: [http://www.foxprohistory.org/tableofcontents.htm Foxprohistory.org]</ref><ref>1995 Reviewers Guide to Visual FoxPro 3.0: [http://www.dfpug.de/loseblattsammlung/migration/whitepapers/vfp_rg.htm DFpug.de]</ref> [[C++]],<ref>{{Cite book|url=https://books.google.com/books?id=MHmqfSBTXsAC&pg=PA16|title=Object Oriented Programming with C++, 1E|isbn=978-81-259-2532-3|last1=Khurana|first1=Rohit|date=1 November 2009|publisher=Vikas Publishing House Pvt Limited }}</ref> and [[Delphi (programming language)|Delphi]]{{Citation needed|date=February 2010}}. Its dominance was further enhanced by the rising popularity of [[graphical user interface]]s, 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 (software)|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 [[modularity (programming)|modular programming]] (although this had been in common use sinceinvestigated the 1960sconcept or earlier, Wirth has addedof type checking across module boundaries). [[Modula-2]] (1978) included boththis concept, and their succeeding design, [[Oberon (programming language)|Oberon]], included a distinctive approach to object orientation, classes, and such. Inheritance is not obvious in Wirth's design since his nomenclature looks the opposite direction: It is called type extension and the viewpoint is from the parent down to the inheritor.
 
Object-oriented features have been added to many previously existing languages, including [[Ada (programming language)|Ada]], [[BASIC]], [[Fortran]], [[Pascal (programming language)|Pascal]], and [[COBOL]]. Adding these features to languages that were not initially designed for them often led to problems with compatibility and maintainability of code.