HOME

TheInfoList



OR:

An object-based language is a
programming language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
that provides a construct to encapsulate state and behavior as an object. A language that also supports
inheritance Inheritance is the practice of receiving private property, titles, debts, entitlements, privileges, rights, and obligations upon the death of an individual. The rules of inheritance differ among societies and have changed over time. Offi ...
or
subtyping In programming language theory, subtyping (also called subtype polymorphism or inclusion polymorphism) is a form of type polymorphism. A ''subtype'' is a datatype that is related to another datatype (the ''supertype'') by some notion of substi ...
is classified as object-oriented. Even though object-oriented seems like a superset of object-based, they are used as mutually exclusive alternatives, rather than overlapping. Examples of strictly object-based languages supporting an object feature but not inheritance or subtyping are early versions of Ada,
Visual Basic 6 Visual Basic (VB), sometimes referred to as Classic Visual Basic, is a third-generation programming language based on BASIC, as well as an associated integrated development environment (IDE). Visual Basic was developed by Microsoft for Window ...
(VB6), and Fortran 90. Some classify
prototype-based programming Prototype-based programming is a style of object-oriented programming in which behavior reuse (known as inheritance) is performed via a process of reusing existing objects that serve as prototypes. This model can also be known as ''prototypal'', ...
as object-based even though it supports inheritance and subtyping albeit not via a
class Class, Classes, 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 d ...
concept. Instead an object inherits its state and behavior from a ''template'' object. A commonly used language with prototype-based programming support is
JavaScript JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior. Web browsers have ...
;


References

Programming paradigms {{prog-lang-stub