Primitive Data Type

In computer science, primitive data type is either of the following:

  • a basic type is a data type provided by a programming language as a basic building block. Most languages allow more complicated composite types to be recursively constructed starting from basic types.
  • a built-in type is a data type for which the programming language provides built-in support.

In most programming languages, all basic data types are built-in. In addition, many languages also provide a set of composite data types. Opinions vary as to whether a built-in type that is not basic should be considered "primitive".

Depending on the language and its implementation, primitive data types may or may not have a one-to-one correspondence with objects in the computer's memory. However, one usually expects operations on basic primitive data types to be the fastest language constructs there are. Integer addition, for example, can be performed as a single machine instruction, and some processors offer specific instructions to process sequences of characters with a single instruction. In particular, the C standard mentions that "a 'plain' int object has the natural size suggested by the architecture of the execution environment". This means that int is likely to be 32 bits long on a 32-bit architecture. Basic primitive types are almost always value types.

Most languages do not allow the behavior or capabilities of primitive (either built-in or basic) data types to be modified by programs. Exceptions include Smalltalk, which permits all data types to be extended within a program, adding to the operations that can be performed on them or even redefining the built-in operations.

Read more about Primitive Data Type:  Overview

Famous quotes containing the words primitive, data and/or type:

    That primitive head
    So ambitiously vast,
    Yet so rude in its art,
    Is as easily read
    For the woes of the past
    As a clinical chart.
    Robert Frost (1874–1963)

    This city is neither a jungle nor the moon.... In long shot: a cosmic smudge, a conglomerate of bleeding energies. Close up, it is a fairly legible printed circuit, a transistorized labyrinth of beastly tracks, a data bank for asthmatic voice-prints.
    Susan Sontag (b. 1933)

    “... In truth I find it ridiculous that a man of his intelligence suffer over this type of person, who is not even interesting, for she is said to be foolish”, she added with all the wisdom of people who are not in love, who find that a sensible man should only be unhappy over a person who is worthwhile; it is almost tantamount to being surprised that anyone deign having cholera for having been infected with a creature as small as the vibrio bacilla.
    Marcel Proust (1871–1922)