Type System

A type system associates a type with each computed value. By examining the flow of these values, a type system attempts to ensure or prove that no type errors can occur. The particular type system in question determines exactly what constitutes a type error, but in general the aim is to prevent operations expecting a certain kind of value from being used with values for which that operation does not make sense (logic errors); memory errors will also be prevented. Type systems are often specified as part of programming languages, and built into the interpreters and compilers for them; although they can also be implemented as optional tools.

In computer science, a type system may be defined as "a tractable syntactic framework for classifying phrases according to the kinds of values they compute".

A compiler may also use the static type of a value to optimize the storage it needs and the choice of algorithms for operations on the value. In many C compilers the float data type, for example, is represented in 32 bits, in accord with the IEEE specification for single-precision floating point numbers. They will thus use floating-point-specific microprocessor operations on those values (floating-point addition, multiplication, etc.).

The depth of type constraints and the manner of their evaluation affect the typing of the language. A programming language may further associate an operation with varying concrete algorithms on each type in the case of type polymorphism. Type theory is the study of type systems, although the concrete type systems of programming languages originate from practical issues of computer architecture, compiler implementation, and language design.

Read more about Type System:  Fundamentals, Type Checking, Polymorphism and Types, Specialized Type Systems, Explicit or Implicit Declaration and Inference, Types of Types, Unified Type System, Compatibility: Equivalence and Subtyping, Programming Style

Famous quotes containing the words type and/or system:

    It is not true that there is dignity in all work. Some jobs are definitely better than others.... People who have good jobs are happy, rich, and well dressed. People who have bad jobs are unhappy, poor and use meat extenders. Those who seek dignity in the type of work that compels them to help hamburgers are certain to be disappointed.
    Fran Lebowitz (b. 1950)

    Our system of government, in spite of Vietnam, Cambodia, CIA, Watergate, is still the best system of government on earth. And the greatest resource of all are the 215 million Americans who still have within us the strength, the character, the intelligence, the experience, the patriotism, the idealism, the compassion, the sense of brotherhood on which we can rely in the future to restore the greatness to our country.
    Jimmy Carter (James Earl Carter, Jr.)