Data Type

'DataType' is a type that abstracts a measurement, description, or property of something (a world, an object, a relationship, a region, a period - 'something' is left intentionally vague).

Common examples include dates, times, counts, distances, volumes, current, resistance, temperature, colors. More exotic forms include voices (for sound), wave-forms, images, graphs, names and addresses, etc. In all cases, they are used in modeling.

One often simplifies these by representing them into more generic 'integers', 'numbers', 'strings', and structures consisting of more than one such element. Such simplifications allow for more general-purpose modeling, but have some costs in terms of safety (might add a distance to a volume), convenience (a model that only understands 'realnum' cannot add '2 inches + 3 meters', for example, or readily switch from feet to miles in a display), and specialized operations (adding two 'volumes in decibels' to get a new volume with the correct log_10(10^(dB1/10)+10^(dB2/10)), multiplying two distances to get an area, adding a number of days to a date).

One might refer to 'data type' as opposed to 'type' to help distinguish them from 'interfaces' (which are more behavior oriented - contravariance, covariance, invariants, preconditions, postconditions), 'linear typing' (which has to do with number of references to a structure), 'effect typing' which analyzes what sort of side-effects an operation might have (arbitrary delay, non-termination, exceptions or checked-exceptions, side-effects), phantom types (used for zero-knowledge proofs protocol security), and so on. TypeTheory has a much broader application than data-level safety.

Despite the fact that TypeTheory has a broader application, in practice most TypeSystems focus very heavily on DataType.

Related: WhatIsData, AbstractDataType


EditText of this page (last edited October 23, 2009) or FindPage with title or text search