3

What is the word used to describe the type of programming languages that provide explicit syntax for defining classes and that support inheritance?

For example: "A ______ language, such as C++, Java, C#, or D."

I keep thinking "object oriented", but that also includes languages like Lua and JavaScript, which aren't quite what I'm thinking of.

I am sure there is a definitive term for this group of languages, I just do not know what it is.

  • 1
    It is object oriented. That is the definition of object oriented. – The_Cthulhu_Kid Mar 20 '14 at 7:02
  • maybe your thinking of polymorphism? en.wikipedia.org/wiki/Polymorphism_(computer_science) – ns47731 Mar 20 '14 at 7:09
  • 1
    @The_Cthulhu_Kid I'm actually looking for a subset of "object-oriented", but I think I found it; looking at this article, it seems there may not be one nice clean word, but the phrase I'm looking for is "class based object oriented" (vs. prototype based). – Jason C Mar 20 '14 at 7:10
  • 1
    It kind of makes sense but I have never felt the need to make the distinction. I'll check out the article though =) – The_Cthulhu_Kid Mar 20 '14 at 7:14
10

Class-based object-oriented language

Class-based programming, or more commonly class-orientation, is a style of object-oriented programming (OOP) in which inheritance is achieved by defining classes of objects, as opposed to the objects themselves (compare prototype-based programming).

3

Classes and inheritance are completely orthogonal to OO. There are languages with classes that aren't object-oriented, there are languages with inheritance that aren't object-oriented, there are languages which are object-oriented and have classes but not inheritance, there are languages which are object-oriented and have inheritance but no classes, and there are languages which are object-oriented and have neither inheritance nor classes.

A common term for languages like Smalltalk is "class-based object-oriented language" (which silently implies inheritance between classes). However, this doesn't apply to languages like Java or C#, because here, object-oriented programming isn't done with classes but with interfaces. In Java or C#, classes describe Abstract Data Types, not Objects, interfaces describe Objects. (See On Understanding Data Abstraction, Revisited by William R. Cook)

So, the best you can probably do is "language with class-based inheritance", which is sometimes also referred to as "classical inheritance".

  • It would be nice to include an example of each language from the first paragraph. – Den Mar 21 '14 at 11:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.