Abstract type

From Wiki @ Karl Jones dot com
Jump to: navigation, search

In programming languages, an abstract type is a type in a nominative type system that cannot be instantiated directly.

Abstract types are also known as existential types.

Description

An abstract type may provide no implementation, or an incomplete implementation.

Often, abstract types will have one or more implementations provided separately, for example, in the form of concrete subclasses that can be instantiated. It may include abstract methods or abstract properties that are shared by its subtypes.

The object oriented form of abstract types are known as abstract base classes or simply abstract classes.

In some languages, abstract types with no implementation are known as protocols, interfaces, signatures, class types.

Other names for language features that are (or may be) used to implement abstract types include traits, mixins, flavors, roles, or type classes.

A type that is not abstract is called a concrete type (or concrete class).

See also

External links