Abstract Type - Use of Abstract Types

Use of Abstract Types

Abstract types are an important feature in statically typed OO languages. Many dynamically typed languages have no equivalent feature (although the use of duck typing makes abstract types unnecessary); however traits are found in some modern dynamically-typed languages.

Some authors argue that classes should be leaf classes (have no subtypes), or else be abstract.

Abstract types are useful in that they can be used to define and enforce a protocol; a set of operations which all objects that implement the protocol must support.

Read more about this topic:  Abstract Type

Famous quotes containing the words abstract and/or types:

    Virtue, my pet, is an abstract idea, varying in its manifestations with the surroundings. Virtue in Provence, in Constantinople, in London, and in Paris bears very different fruit, but is none the less virtue.
    HonorĂ© De Balzac (1799–1850)

    Our major universities are now stuck with an army of pedestrian, toadying careerists, Fifties types who wave around Sixties banners to conceal their record of ruthless, beaverlike tunneling to the top.
    Camille Paglia (b. 1947)