HOME

TheInfoList




Object-oriented programming (OOP) is a
programming paradigm Programming paradigms are a way to classify programming languages based on their features. Languages can be classified into multiple paradigms. Some paradigms are concerned mainly with implications for the execution model of the language, suc ...
based on the concept of " objects", which can contain
data Data (; ) are individual facts, statistics, or items of information, often numeric. In a more technical sense, data are a set of values of qualitative property, qualitative or quantity, quantitative variable (research), variables about one or ...

data
and code: data in the form of
fields File:A NASA Delta IV Heavy rocket launches the Parker Solar Probe (29097299447).jpg, FIELDS heads into space in August 2018 as part of the ''Parker Solar Probe'' FIELDS is a science instrument on the ''Parker Solar Probe'' (PSP), designed to mea ...
(often known as
attributes Attribute may refer to: * Attribute (philosophy), an extrinsic property of an object * Attribute (research), a characteristic of an object * Grammatical modifier, in natural languages * Attribute (computing), a specification that defines a propert ...
or ''properties''), and code, in the form of procedures (often known as '' methods''). A feature of objects is that an object's own procedures can access and often modify the data fields of itself (objects have a notion of or ). In OOP, computer programs are designed by making them out of objects that interact with one another. OOP languages are diverse, but the most popular ones are class-based, meaning that objects are instances of
classes Class or The Class may refer to: Common uses not otherwise categorized * Class (biology), a taxonomic rank * Class (knowledge representation), a collection of individuals or objects * Class (philosophy), an analytical concept used differently f ...
, which also determine their
types Type may refer to: Science and technology Computing * Typing Typing is the process of writing or inputting text by pressing keys on a typewriter, computer keyboard, cell phone, or calculator. It can be distinguished from other means of text inpu ...
. Many of the most widely used programming languages (such as C++, Java, Python, etc.) are multi-paradigm and they support object-oriented programming to a greater or lesser degree, typically in combination with
imperative Imperative may refer to: *Imperative mood, a grammatical mood (or mode) expressing commands, direct requests, and prohibitions *Imperative programming, a programming paradigm in computer science *Imperative logic *Imperative (film), ''Imperative'' ...
,
procedural programming Procedural programming is a programming paradigm Programming paradigms are a way to classify programming languages based on their features. Languages can be classified into multiple paradigms. Some paradigms are concerned mainly with im ...
. Significant object-oriented languages include:
Java Java ( id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands The Greater Sunda Islands are four tropical islands situated within Southeast Asia, in the Pacific Ocean. The islands, Borneo, Java, Sulawesi and Sumatra, are internat ...
,
C++ C++ () is a general-purpose programming language In computer software, a general-purpose programming language is a programming language dedicated to a general-purpose, designed to be used for writing software in a wide variety of application ...

C++
, C#,
Python PYTHON was a Cold War contingency plan of the Government of the United Kingdom, British Government for the continuity of government in the event of Nuclear warfare, nuclear war. Background Following the report of the Strath Committee in 1955, the ...
, R,
PHP PHP is a general-purpose scripting language geared towards web development Web development is the work involved in developing a Web site, website for the Internet (World Wide Web) or an intranet (a private network). Web development can range ...

PHP
, Visual Basic.NET,
JavaScript JavaScript (), often abbreviated JS, is a programming language A programming language is a formal language comprising a Instruction set architecture, set of instructions that produce various kinds of Input/output, output. Programming lang ...

JavaScript
,
Ruby A ruby is a pink to blood-red coloured gemstone A gemstone (also called a gem, fine gem, jewel, precious stone, or semi-precious stone) is a piece of mineral crystal which, in cut and polished form, is used to make jewellery, jewelry or othe ...
,
Perl Perl is a family of two high-level High-level and low-level, as technical terms, are used to classify, describe and point to specific Objective (goal), goals of a systematic operation; and are applied in a wide range of contexts, such as, for ...
,
SIMSCRIPT SIMSCRIPT is a free-form, English English usually refers to: * English language English is a West Germanic languages, West Germanic language first spoken in History of Anglo-Saxon England, early medieval England, which has eventually beco ...
,
Object Pascal Object Pascal is an extension to the programming language Pascal Pascal, Pascal's or PASCAL may refer to: People and fictional characters * Pascal (given name), including a list of people with the name * Pascal (surname), including a list of p ...
,
Objective-C Objective-C is a general-purpose, object-oriented Object-oriented programming (OOP) is a programming paradigm Program, programme, programmer, or programming may refer to: Business and management * Program management, the process of m ...
, Dart,
Swift The Society for Worldwide Interbank Financial Telecommunication (SWIFT), legally S.W.I.F.T. SCRL, is a Belgian Belgian may refer to: * Something of, or related to, Belgium Belgium, ; french: Belgique ; german: Belgien officially the ...
, Scala, Kotlin,
Common Lisp Common Lisp (CL) is a dialect of the Lisp programming language Lisp (historically LISP) is a family of programming language A programming language is a formal language In mathematics Mathematics (from Ancient Greek, Greek: ) incl ...
,
MATLAB MATLAB (an abbreviation of "MATrix LABoratory") is a and environment developed by . MATLAB allows manipulations, plotting of and data, implementation of s, creation of s, and interfacing with programs written in other languages. Althoug ...
, and
Smalltalk Smalltalk is an object-oriented programming, object-oriented, dynamically typed reflection (computer science), reflective programming language. Smalltalk was created as the language underpinning the "new world" of computing exemplified by "human ...

Smalltalk
.


History

Terminology invoking "objects" and "oriented" in the modern sense of object-oriented programming made its first appearance at
MIT Massachusetts Institute of Technology (MIT) is a private land-grant research university A research university is a university A university ( la, universitas, 'a whole') is an educational institution, institution of higher education, hi ...

MIT
in the late 1950s and early 1960s. In the environment of the
artificial intelligence Artificial intelligence (AI) is intelligence Intelligence has been defined in many ways: the capacity for abstraction Abstraction in its main sense is a conceptual process where general rules and concept Concepts are defined as abstra ...

artificial intelligence
group, as early as 1960, "object" could refer to identified items (
LISP Lisp (historically LISP) is a family of programming language A programming language is a formal language In logic, mathematics, computer science, and linguistics, a formal language consists of string (computer science), words whose symbo ...
atoms) with properties (attributes);
Alan Kay Alan Curtis Kay (born May 17, 1940) published by the Association for Computing Machinery The Association for Computing Machinery (ACM) is a US-based international learned society for computing. It was founded in 1947 and is the world's largest ...

Alan Kay
later cited a detailed understanding of LISP internals as a strong influence on his thinking in 1966. Another early MIT example was
Sketchpad Sketchpad (a.k.a. Robot Draftsman) is a computer program written by Ivan Sutherland Ivan Edward Sutherland (born May 16, 1938) is an American computer scientist A computer scientist is a person A person (plural people or persons) is a be ...
created by
Ivan Sutherland Ivan Edward Sutherland (born May 16, 1938) is an American computer scientist A computer scientist is a person A person (plural people or persons) is a being that has certain capacities or attributes such as reason, morality, consciousness o ...
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. Also, an MIT
ALGOL ALGOL (; short for "Algorithmic Language") is a family of imperative Imperative may refer to: *Imperative mood, a grammatical mood (or mode) expressing commands, direct requests, and prohibitions *Imperative programming, a programming paradigm ...
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". The Development of the Simula Languages,
Kristen Nygaard Kristen Nygaard (27 August 1926 – 10 August 2002) was a Norwegian computer scientist A computer scientist is a person who has acquired the knowledge of computer science Computer science deals with the theoretical foundations of infor ...
,
Ole-Johan Dahl Ole-Johan Dahl (12 October 1931 – 29 June 2002) was a Norwegian computer scientist. Dahl was a professor of computer science at the University of Oslo and is considered to be one of the fathers of Simula and object-oriented programming along wi ...
, p.254
Uni-kl.ac.at
Simula Simula is the name of two simulation A simulation is the imitation of the operation of a real-world process or system over time. Simulations require the use of Conceptual model, models; the model represents the key characteristics or behavio ...
introduced important concepts that are today an essential part of object-oriented programming, such as
class Class or The Class may refer to: Common uses not otherwise categorized * Class (biology), a taxonomic rank * Class (knowledge representation), a collection of individuals or objects * Class (philosophy), an analytical concept used differently f ...
and
object Object may refer to: General meanings * Object (philosophy), a thing, being, or concept ** Entity, something that is tangible and within the grasp of the senses ** Object (abstract), an object which does not exist at any particular time or pl ...
, inheritance, and
dynamic binding Dynamic binding may refer to: *Dynamic binding (computing), also known as late binding *Scope_(computer_science)#Dynamic_scoping, Dynamic scoping in programming languages *Dynamic binding (chemistry) See also

*Dynamic dispatch *Dynamic linking ...
. 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. In the 1970s, the first version of the
Smalltalk Smalltalk is an object-oriented programming, object-oriented, dynamically typed reflection (computer science), reflective programming language. Smalltalk was created as the language underpinning the "new world" of computing exemplified by "human ...

Smalltalk
programming language was developed at
Xerox PARC PARC (Palo Alto Research Center; formerly Xerox PARC) is a research and development company in Palo Alto, California. Founded in 1969 by Jack Goldman, Jacob E. "Jack" Goldman, Xerox Corporation's chief scientist, the company was originally a divis ...
by
Alan Kay Alan Curtis Kay (born May 17, 1940) published by the Association for Computing Machinery The Association for Computing Machinery (ACM) is a US-based international learned society for computing. It was founded in 1947 and is the world's largest ...

Alan Kay
,
Dan Ingalls Daniel Henry Holmes Ingalls Jr. (born 1944) is a pioneer of object-oriented computer programming Computer programming is the process of designing and building an executable computer program to accomplish a specific computing result or to perf ...

Dan Ingalls
and Adele Goldberg. Smalltalk-72 included a programming environment and was
dynamically typed In programming language A programming language is a formal language comprising a Instruction set architecture, set of instructions that produce various kinds of Input/output, output. Programming languages are used in computer programming to i ...
, and at first was interpreted, not
compiled In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily ...

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. 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. In the 1970s, Smalltalk influenced the Lisp community to incorporate object-based techniques that were introduced to developers via the
Lisp machine Lisp machines are general-purpose computers designed to efficiently run Lisp A lisp is a speech impairment in which a person misarticulates sibilant In phonetics Phonetics is a branch of linguistics that studies how humans produce and per ...

Lisp machine
. Experimentation with various extensions to Lisp (such as LOOPS and
Flavors Flavor, or flavour, is the perceptual Perception (from the Latin Latin (, or , ) is a classical language belonging to the Italic languages, Italic branch of the Indo-European languages. Latin was originally spoken in the area arou ...
introducing
multiple inheritance Multiple inheritance is a feature of some computer s in which an object or can features from more than one parent object or . It is distinct from single inheritance, where an object or class may only inherit from one particular object or class. ...

multiple inheritance
and mixins) eventually led to the
Common Lisp Object System The Common Lisp Object System (CLOS) is the facility for object-oriented programming which is part of American National Standards Institute, ANSI Common Lisp. CLOS is a powerful dynamic programming language, dynamic object system which differs radi ...
, 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 The iAPX 432 (''Intel Advanced Performance Architecture'') is a discontinued computer architecture In computer engineering, computer architecture is a set of rules and methods that describe the functionality, organization, and implementation o ...
and the Linn Smart
RekursivRekursiv was a computer processor A central processing unit (CPU), also called a central processor, main processor or just Processor (computing), processor, is the electronic circuitry that executes Instruction (computing), instructions compris ...
. In 1981, Goldberg edited the August issue of
Byte Magazine ''Byte'' (stylized as ''BYTE'') was an American microcomputer computer magazine, magazine, influential in the late 1970s and throughout the 1980s because of its wide-ranging editorial coverage. "''Byte'' magazine, the leading publication serving ...
, introducing Smalltalk and object-oriented programming to a wider audience. In 1986, the
Association for Computing Machinery The Association for Computing Machinery (ACM) is a US-based international learned society A learned society (; also known as a learned academy, scholarly society, or academic association) is an organization that exists to promote an discipl ...
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 Objective-C is a general-purpose, object-oriented Object-oriented programming (OOP) is a programming paradigm Program, programme, programmer, or programming may refer to: Business and management * Program management, the process of m ...
was developed by
Brad Cox Brad J. Cox (May 2, 1944 – January 2, 2021) was an American computer scientist A computer scientist is a person A person (plural people or persons) is a being that has certain capacities or attributes such as reason, morality, conscio ...
, who had used Smalltalk at ITT Inc., and
Bjarne Stroustrup Bjarne Stroustrup (; ; born 30 December 1950) is a Danish computer scientist A computer scientist is a person A person (plural people or persons) is a being that has certain capacities or attributes such as reason, morality, consciousness ...

Bjarne Stroustrup
, who had used Simula for his PhD thesis, eventually went to create the object-oriented
C++ C++ () is a general-purpose programming language In computer software, a general-purpose programming language is a programming language dedicated to a general-purpose, designed to be used for writing software in a wide variety of application ...

C++
. In 1985,
Bertrand Meyer Bertrand Meyer (; ; born 21 November 1950) is a French academic, author, and consultant in the field of computer languages. He created the Eiffel programming language and the idea of design by contract Design by contract (DbC), also known as contr ...

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 Object-oriented programming (OOP) is a programming paradigm based on the concept of "Object (computer science), objects", which can contain data and code: data in the form of Field (computer science), fields (often known as Attribute (computing ...
. Essential to the quality focus of Eiffel is Meyer's reliability mechanism,
Design by Contract Design by contract (DbC), also known as contract programming, programming by contract and design-by-contract programming, is an approach for designing software. It prescribes that software designers should define formal, precise and verifiable in ...

Design by Contract
, which is an integral part of both the method and language. In the early and mid-1990s object-oriented programming developed as the dominant programming
paradigm In science Science () is a systematic enterprise that Scientific method, builds and organizes knowledge in the form of Testability, testable explanations and predictions about the universe."... modern science is a discovery as well as ...
when programming languages supporting the techniques became widely available. These included Visual
FoxPro FoxPro was a text-based In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer ...
3.0,
C++ C++ () is a general-purpose programming language In computer software, a general-purpose programming language is a programming language dedicated to a general-purpose, designed to be used for writing software in a wide variety of application ...

C++
, and
Delphi Delphi (; ), in legend previously called Pytho (Πυθώ), in ancient times was a sacred precinct that served as the seat of Pythia, the major oracle who was consulted about important decisions throughout the ancient classical world. The oracle ...
. Its dominance was further enhanced by the rising popularity of
graphical user interface The graphical user interface (GUI "UI" by itself is still usually pronounced . or ) is a form of user interface In the industrial design Industrial design is a process of design A design is a plan or specification for the construction ...
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 CoCoA (Computations in Commutative Algebra) is a free computer algebra system developed by the University of Genova, Italy, used to compute with numbers and polynomials. The CoCoA Library (CoCoALib) is available under GNU General Public License. ...
frameworks on
Mac OS X macOS (; previously Mac OS X and later OS X) is a proprietary {{Short pages monitor It is intuitive to assume that inheritance creates a
semantic Semantics (from grc, σημαντικός ''sēmantikós'', "significant") is the study of reference Reference is a relationship between objects in which one object designates, or acts as a means by which to connect to or link to, another ...
" is a" relationship, and thus to infer that objects instantiated from subclasses can always be ''safely'' used instead of those instantiated from the superclass. This intuition is unfortunately false in most OOP languages, in particular in all those that allow mutable objects. Subtype polymorphism as enforced by the type checker in OOP languages (with mutable objects) cannot guarantee behavioral subtyping in any context. Behavioral subtyping is undecidable in general, so it cannot be implemented by a program (compiler). Class or object hierarchies must be carefully designed, considering possible incorrect uses that cannot be detected syntactically. This issue is known as the Liskov substitution principle.


Gang of Four design patterns

''Design Patterns (book), Design Patterns: Elements of Reusable Object-Oriented Software'' is an influential book published in 1994 by Erich Gamma, Richard Helm, Ralph Johnson (computer scientist), Ralph Johnson, and John Vlissides, often referred to humorously as the "Gang of Four". Along with exploring the capabilities and pitfalls of object-oriented programming, it describes 23 common programming problems and patterns for solving them. As of April 2007, the book was in its 36th printing. The book describes the following patterns: * ''Creational patterns'' (5): Factory method pattern, Abstract factory pattern, Singleton pattern, Builder pattern, Prototype pattern * ''Structural patterns'' (7): Adapter pattern, Bridge pattern, Composite pattern, Decorator pattern, Facade pattern, Flyweight pattern, Proxy pattern * ''Behavioral patterns'' (11): Chain-of-responsibility pattern, Command pattern, Interpreter pattern, Iterator pattern, Mediator pattern, Memento pattern, Observer pattern, State pattern, Strategy pattern, Template method pattern, Visitor pattern


Object-orientation and databases

Both object-oriented programming and relational database management systems (RDBMSs) are extremely common in software . Since relational databases don't store objects directly (though some RDBMSs have object-oriented features to approximate this), there is a general need to bridge the two worlds. The problem of bridging object-oriented programming accesses and data patterns with relational databases is known as object-relational impedance mismatch. There are a number of approaches to cope with this problem, but no general solution without downsides. One of the most common approaches is object-relational mapping, as found in Integrated development environment, IDE languages such as Visual FoxPro and libraries such as Java Data Objects and Ruby on Rails' ActiveRecord. There are also object databases that can be used to replace RDBMSs, but these have not been as technically and commercially successful as RDBMSs.


Real-world modeling and relationships

OOP can be used to associate real-world objects and processes with digital counterparts. However, not everyone agrees that OOP facilitates direct real-world mapping (see object-oriented programming#Criticism, Criticism section) or that real-world mapping is even a worthy goal;
Bertrand Meyer Bertrand Meyer (; ; born 21 November 1950) is a French academic, author, and consultant in the field of computer languages. He created the Eiffel programming language and the idea of design by contract Design by contract (DbC), also known as contr ...

Bertrand Meyer
argues in ''
Object-Oriented Software Construction Object-oriented programming (OOP) is a programming paradigm based on the concept of "Object (computer science), objects", which can contain data and code: data in the form of Field (computer science), fields (often known as Attribute (computing ...
''Meyer, Second Edition, p. 230 that a program is not a model of the world but a model of some part of the world; "Reality is a cousin twice removed". At the same time, some principal limitations of OOP have been noted. For example, the circle-ellipse problem is difficult to handle using OOP's concept of
inheritance Inheritance is the practice of passing on private property Private property is a legal designation for the ownership of property by non-governmental legal entities. Private property is distinguishable from public property Public property i ...
. However,
Niklaus Wirth Niklaus Emil Wirth (born 15 February 1934) is a Swiss . He has designed several s, including , and pioneered several classic topics in software engineering. In 1984, he won the , generally recognized as the highest distinction in , for developin ...

Niklaus Wirth
(who popularized the adage now known as Wirth's law: "Software is getting slower more rapidly than hardware becomes faster") said of OOP in his paper, "Good Ideas through the Looking Glass", "This paradigm closely reflects the structure of systems 'in the real world', and it is therefore well suited to model complex systems with complex behaviours" (contrast KISS principle). Steve Yegge and others noted that natural languages lack the OOP approach of strictly prioritizing ''things'' (objects/nouns) before ''actions'' (methods/verbs). This problem may cause OOP to suffer more convoluted solutions than procedural programming.


OOP and control flow

OOP was developed to increase the code reuse, reusability and software maintenance, maintainability of source code. Transparent representation of the control flow had no priority and was meant to be handled by a compiler. With the increasing relevance of parallel hardware and thread (computer science), multithreaded coding, developing transparent control flow becomes more important, something hard to achieve with OOP.


Responsibility- vs. data-driven design

Responsibility-driven design defines classes in terms of a contract, that is, a class should be defined around a responsibility and the information that it shares. This is contrasted by Wirfs-Brock and Wilkerson with Data-driven programming, data-driven design, where classes are defined around the data-structures that must be held. The authors hold that responsibility-driven design is preferable.


SOLID and GRASP guidelines

SOLID (object-oriented design), SOLID is a mnemonic invented by Michael Feathers that stands for and advocates five programming practices: * Single responsibility principle * Open/closed principle * Liskov substitution principle * Interface segregation principle * Dependency inversion principle GRASP (object-oriented design), GRASP (General Responsibility Assignment Software Patterns) is another set of guidelines advocated by Craig Larman.


Criticism

The OOP paradigm has been criticised for a number of reasons, including not meeting its stated goals of reusability and modularity, and for overemphasizing one aspect of software design and modeling (data/objects) at the expense of other important aspects (computation/algorithms). Luca Cardelli has claimed that OOP code is "intrinsically less efficient" than procedural code, that OOP can take longer to compile, and that OOP languages have "extremely poor modularity properties with respect to class extension and modification", and tend to be extremely complex. The latter point is reiterated by Joe Armstrong (programming), Joe Armstrong, the principal inventor of Erlang (programming language), Erlang, who is quoted as saying:Armstrong, Joe. In ''Coders at Work: Reflections on the Craft of Programming.'' Peter Seibel, ed
Codersatwork.com
, Accessed 13 November 2009.
A study by Potok et al. has shown no significant difference in productivity between OOP and procedural approaches. Christopher J. Date stated that critical comparison of OOP to other technologies, relational in particular, is difficult because of lack of an agreed-upon and rigorous definition of OOP;C. J. Date, Introduction to Database Systems, 6th-ed., Page 650 however, Date and Darwen have proposed a theoretical foundation on OOP that uses OOP as a kind of customizable data type, type system to support RDBMS.C. J. Date, Hugh Darwen. ''Foundation for Future Database Systems: The Third Manifesto'' (2nd Edition) In an article Lawrence Krubner claimed that compared to other languages (LISP dialects, functional languages, etc.) OOP languages have no unique strengths, and inflict a heavy burden of unneeded complexity. Alexander Stepanov compares object orientation unfavourably to generic programming: Paul Graham (computer programmer), Paul Graham has suggested that OOP's popularity within large companies is due to "large (and frequently changing) groups of mediocre programmers". According to Graham, the discipline imposed by OOP prevents any one programmer from "doing too much damage". Leo Brodie has suggested a connection between the standalone nature of objects and a tendency to duplicate code in violation of the don't repeat yourself principle of software development. Steve Yegge noted that, as opposed to functional programming: Rich Hickey, creator of Clojure, described object systems as overly simplistic models of the real world. He emphasized the inability of OOP to model time properly, which is getting increasingly problematic as software systems become more concurrent.Rich Hickey, JVM Languages Summit 2009 keynote
Are We There Yet?
November 2009.
Eric S. Raymond, a Unix programmer and open-source software advocate, has been critical of claims that present object-oriented programming as the "One True Solution", and has written that object-oriented programming languages tend to encourage thickly layered programs that destroy transparency. Raymond compares this unfavourably to the approach taken with Unix and the C (programming language), C programming language. Rob Pike, a programmer involved in the creation of UTF-8 and Go, has called object-oriented programming "the Roman numerals of computing" and has said that OOP languages frequently shift the focus from data structures and algorithms to
types Type may refer to: Science and technology Computing * Typing Typing is the process of writing or inputting text by pressing keys on a typewriter, computer keyboard, cell phone, or calculator. It can be distinguished from other means of text inpu ...
. Furthermore, he cites an instance of a
Java Java ( id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands The Greater Sunda Islands are four tropical islands situated within Southeast Asia, in the Pacific Ocean. The islands, Borneo, Java, Sulawesi and Sumatra, are internat ...
professor whose "idiomatic" solution to a problem was to create six new classes, rather than to simply use a lookup table.


Formal semantics

Objects are the run-time entities in an object-oriented system. They may represent a person, a place, a bank account, a table of data, or any item that the program has to handle. There have been several attempts at formalizing the concepts used in object-oriented programming. The following concepts and constructs have been used as interpretations of OOP concepts: * F-Coalgebra, co algebraic data types *
abstract data type In computer science Computer science deals with the theoretical foundations of information, algorithms and the architectures of its computation as well as practical techniques for their application. Computer science is the study of , ...
s (which have existential types) allow the definition of module (programming), modules but these do not support
dynamic dispatch In computer science Computer science deals with the theoretical foundations of information, algorithms and the architectures of its computation as well as practical techniques for their application. Computer science is the study of Algo ...
* recursive types * encapsulated state *
inheritance Inheritance is the practice of passing on private property Private property is a legal designation for the ownership of property by non-governmental legal entities. Private property is distinguishable from public property Public property i ...
* Record (computer science), records are basis for understanding objects if function literals can be stored in fields (like in functional-programming languages), but the actual calculi need be considerably more complex to incorporate essential features of OOP. Several extensions of System F-sub, System F<: that deal with mutable objects have been studied; these allow both subtype polymorphism and parametric polymorphism (generics) Attempts to find a consensus definition or theory behind objects have not proven very successful (however, see Abadi & Cardelli
''A Theory of Objects''
ref name="AbadiCardelli">
for formal definitions of many OOP concepts and constructs), and often diverge widely. For example, some definitions focus on mental activities, and some on program structuring. One of the simpler definitions is that OOP is the act of using "map" data structures or arrays that can contain functions and pointers to other maps, all with some syntactic sugar, syntactic and scoping sugar on top. Inheritance can be performed by cloning the maps (sometimes called "prototyping").


See also

* Comparison of programming languages (object-oriented programming) * Comparison of programming paradigms * Component-based software engineering * Design by contract * Object association * Object database * Object model reference * Object modeling language * Object-oriented analysis and design * Object-relational impedance mismatch (and The Third Manifesto) * Object-relational mapping


Systems

* CADES * Common Object Request Broker Architecture (CORBA) * Distributed Component Object Model *
Distributed Data Management Architecture Distributed Data Management Architecture (DDM) is IBM's open, published software architecture for creating, managing and accessing data on a remote computer. DDM was initially designed to support #Record-oriented files, record-oriented files; it was ...
* Jeroo


Modeling languages

* IDEF4 * Interface description language * Lepus3 * Unified Modeling Language, UML


References


Further reading

* * * * * * * * * * * * * * * * *


External links


Introduction to Object Oriented Programming Concepts (OOP) and More
by L.W.C. Nirosh
Discussion on Cons of OOP


{{DEFAULTSORT:Object-Oriented Programming Object-oriented programming, Programming paradigms Norwegian inventions