In computer science and logic, a dependent type is a type which depends on a value. Dependent types play a central role in Intuitionistic Type Theory and in the design of experimental functional programming languages like DML or Epigram. Wikibooks Wikiversity has more about this subject: School of Computer Science Open Directory Project: Computer Science Downloadable Science and Computer Science books Collection of Computer Science Bibliographies Belief that title science in computer science is inappropriate Categories: Computer science ... Logic (from Classical Greek λÏÎ³Î¿Ï (logos), originally meaning the word, or what is spoken, but coming to mean thought or reason) is most often said to be the study of arguments, although the exact definition of logic is a matter of controversy amongst philosophers (see below). ... Type has historically had the following uses: In biology, a type is the specimen or specimens upon which an original species description is based. ... Intuitionistic Type Theory, or Constructive Type Theory, or Martin-Löf Type Theory or just Type Theory (with capital letters) is at the same time a functional programming language, a logic and a set theory based on the principles of mathematical constructivism. ... Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions. ... Dependent ML is an experimental functional programming language proposed by Frank Pfenning and Hongwei Xi. ... Epigram is a functional programming language with dependent types and at the same time an interactive program development system. ...
An example is the type of n-tuples of real numbers, which we may denote as , this is a dependent type because the type depends on the value .
Typetheory studies type systems, although the concrete type systems of programming languages originate from practical issues of computer architecture, compiler implementation and language design.
Type systems that allow polymorphism generally do so in order to improve the potential for code re-use: in a language with polymorphism, programmers need only implement a data structure such as a list or a dictionary once, rather than once for each type of element with which they plan to use it.
A type-checker for a statically typed language must verify that the type of any expression is consistent with the type expected by the context in which that expression appears.