Data Type - Definition of A "type"

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 a, definition of, definition and/or type:

    It’s a rare parent who can see his or her child clearly and objectively. At a school board meeting I attended . . . the only definition of a gifted child on which everyone in the audience could agree was “mine.”
    Jane Adams (20th century)

    The physicians say, they are not materialists; but they are:MSpirit is matter reduced to an extreme thinness: O so thin!—But the definition of spiritual should be, that which is its own evidence. What notions do they attach to love! what to religion! One would not willingly pronounce these words in their hearing, and give them the occasion to profane them.
    Ralph Waldo Emerson (1803–1882)

    The definition of good prose is proper words in their proper places; of good verse, the most proper words in their proper places. The propriety is in either case relative. The words in prose ought to express the intended meaning, and no more; if they attract attention to themselves, it is, in general, a fault.
    Samuel Taylor Coleridge (1772–1834)

    It took six weeks of debate in the Senate to get the Arms Embargo Law repealed—and we face other delays during the present session because most of the Members of the Congress are thinking in terms of next Autumn’s election. However, that is one of the prices that we who live in democracies have to pay. It is, however, worth paying, if all of us can avoid the type of government under which the unfortunate population of Germany and Russia must exist.
    Franklin D. Roosevelt (1882–1945)