Definition of A "type"
(Parnas, Shore & Weiss 1976) identified five definitions of a "type" that were used—sometimes implicitly—in the literature:
- Syntactic
- A type is a purely syntactic label associated with a variable when it is declared. Such definitions of "type" do not give any semantic meaning to types.
- Representation
- A type is defined in terms of its composition of more primitive types—often machine types.
- Representation and behaviour
- A type is defined as its representation and a set of operators manipulating these representations.
- Value space
- A type is a set of possible values which a variable can posses. Such definitions make it possible to speak about (disjoint) unions or Cartesian products of types.
- Value space and behaviour
- A type is a set of values which a variable can posses and a set of functions that one can apply to these values.
The definition in terms of a representation was often done in imperative languages such as ALGOL and Pascal, while the definition in terms of a value space and behaviour was used in higher-level languages such as Simula and CLU.
Read more about this topic: Data Type
Famous quotes containing the words definition of, definition and/or type:
“Beauty, like all other qualities presented to human experience, is relative; and the definition of it becomes unmeaning and useless in proportion to its abstractness. To define beauty not in the most abstract, but in the most concrete terms possible, not to find a universal formula for it, but the formula which expresses most adequately this or that special manifestation of it, is the aim of the true student of aesthetics.”
—Walter Pater (18391894)
“The very definition of the real becomes: that of which it is possible to give an equivalent reproduction.... The real is not only what can be reproduced, but that which is always already reproduced. The hyperreal.”
—Jean Baudrillard (b. 1929)
“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)