Data Type - Type Systems

Type Systems

A type system associates types with each computed value. By examining the flow of these values, a type system attempts to prove that no type errors can occur. The type system in question determines what constitutes a type error, but a type system generally seeks to guarantee that operations expecting a certain kind of value are not used with values for which that operation does not make sense.

A compiler may 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.

Type systems may be variously static or dynamic, strong or weak typing, and so forth.

Read more about this topic:  Data Type

Famous quotes containing the words type and/or systems:

    There is a limit to the application of democratic methods. You can inquire of all the passengers as to what type of car they like to ride in, but it is impossible to question them as to whether to apply the brakes when the train is at full speed and accident threatens.
    Leon Trotsky (1879–1940)

    What is most original in a man’s nature is often that which is most desperate. Thus new systems are forced on the world by men who simply cannot bear the pain of living with what is. Creators care nothing for their systems except that they be unique. If Hitler had been born in Nazi Germany he wouldn’t have been content to enjoy the atmosphere.
    Leonard Cohen (b. 1934)