Class-based programming: Difference between revisions

Content deleted Content added
Addbot (talk | contribs)
m Bot: Migrating 1 interwiki links, now provided by Wikidata on d:q5127844
Added a note on nominality and a reference to NOOP
Line 12:
:''See [[Inheritance (object-oriented programming)|Inheritance]]''
 
[[Inheritance (computer science)|Inheritance]] is typically done by grouping objects into ''classes'', and defining [[class (computer science)|class]]es as [[Extension (semantics)|extension]]s of existing classes, and thus grouping classes into ''trees'' or ''lattices'' reflecting behavioral commonality. Although the use of classes is the most popular technique for inheritance, another well-known technique is prototype-based programming. In statically-typed class-based OO languages (such as [[Java (programming language)|Java]], [[C Sharp (programming language)|C#]], [[C++ (programming language)|C++]] and [[Scala (programming language)|Scala]]), usually also called [[Nominative type system|nominally-typed]] OO languages, class/interface inheritance and class/interface subtyping (i.e., the substitution of objects of a class for objects of another class) completely agree. In nominally-typed OOP, inheritance ''is'' subtyping.<ref name="NOOP">AbdelGawad, Moez. ''NOOP: A Mathematical Model of Object-Oriented Programming'', 2012. http://scholarship.rice.edu/handle/1911/70199</ref>
 
==Critique of class-based models==