Type class

Type class

In computer science, a type class is a type system construct that supports ad-hoc polymorphism. This is achieved by adding constraints to type variables in parametrically polymorphic types. Such a constraint typically involves a type class T and a type variable a, and means that a can only be instantiated to a type whose members support the overloaded operations associated with T.

Type classes first appeared in the Haskell programming language, and were originally conceived as a way of implementing overloaded arithmetic and equality operators in a principled fashion.]

See also

* Polymorphism (computer science) (other kinds of polymorphism)
* Haskell programming language (the language in which type classes were designed)
* Operator overloading (one application of type classes)
* Monads in functional programming (Monad is an example of a type class)

References

* Simon Peyton Jones, Mark Jones, Erik Meijer. " [http://research.microsoft.com/~simonpj/Papers/type-class-design-space Type classes: an exploration of the design space] ". From Proc. ACM SIGPLAN Haskell Workshop. May, 1997.
* Mark Jones. " [http://web.cecs.pdx.edu/~mpj/pubs/fundeps.html Type Classes with Functional Dependencies] ". From Proc. 9th European Symposium on Programming. March, 2000.

External links

* A Gentle Introduction to Haskell, Version 98, chapter [http://www.haskell.org/tutorial/classes.html 5. Type Classes and Overloading] . June 2000.
* Advanced Functional Programming course at Utrecht University, 74 lecture slides on [http://www.cs.uu.nl/wiki/pub/Afp/CourseSchedule/AFP-classes.pdf Advanced Type Classes] . 2005-06-07.


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Class 375 — (BR) La rame de type 375/9 n°375908 à London Bridge …   Wikipédia en Français

  • Class America F1 — IACC F1 Pont du F1 Équipage 16 + invité Débuts 1989 Longueur hors tout 23 m Maître bau 5,50 m Tirant d eau 4,50 m Voilure …   Wikipédia en Français

  • Class (computer programming) — In object oriented programming, a class is a construct that is used as a blueprint to create instances of itself – referred to as class instances, class objects, instance objects or simply objects. A class defines constituent members which enable …   Wikipedia

  • Type polymorphism — In computer science, polymorphism is a programming language feature that allows values of different data types to be handled using a uniform interface. The concept of parametric polymorphism applies to both data types and functions. A function… …   Wikipedia

  • type — I (New American Roget s College Thesaurus) n. sign, emblem; kind, class, sort, nature; standard, model, example, ideal; group; letter, figure, character. See indication, printing, form. v. type, class; symbolize; typewrite, touch type, hunt and… …   English dictionary for students

  • Class driver — In computing, a class driver is a type of hardware device driver that can operate a large number of different devices of a broadly similar type. Class drivers are very often used with USB based devices, which share the essential USB protocol in… …   Wikipedia

  • type — Synonyms and related words: Platonic form, Platonic idea, adumbration, aesthetic form, affinity, alien, allegory, alphabetize, analyze, animus, antetype, antitype, aptitude, archetype, area, arrange, art form, ascender, assort, augury, auspice,… …   Moby Thesaurus

  • Type 205 submarine — U 1 (S180) Class overview Builders: Howaldtswerke, Kiel Copenha …   Wikipedia

  • Class (format de fichier) — Classe Java Extension de fichier .class Type MIME application/java vm Développé par Sun Microsystems Type de format …   Wikipédia en Français

  • Type 62 class gunboat — Type 062 class gunboat is the successor of Shantou class gunboat, and it is also known as Shanghai I/II classes. The class is larger than its predecessor and is the most widely built and exported Chinese military boat in terms of numbers. This… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”