Polymorphic-typed languages exploit this uniformity without losing the ability to catch errors by enforcing a type discipline. That is, although the language is strongly typed, the types of all the expressions occurring in the program are inferred by the compiler. Hence, ML programs are almost free of type declarations. However, object-oriented features, side effects, and polymorphism result in very complex type systems. Dependent Types and Constructive Type Theories.
Dependent types is the ability to define types which depend on terms.
A general theory of dependent types, called LP, was proposed by Harper et al. According to this principle, a proof of a logical proposition A is the same as a term of type A . In practice, the Curry-Howard isomorphism is used to extract a program from the constructive proof of the correctness of an algorithm. Programs extracted in this way satisfy the termination property. Although very simple dependent types are used in most programming languages, general dependent types and constructive types are still hard to handle in programming languages.