1/36
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Data Type
defines a collection of data values and the operations that can be performed on them
User-Defined Types
are custom data types created by programmers for better readability and
modifiability.
Abstract Data Type (ADT)
separates how a data type is used from how it is implemented. All of
the types in high-level programming language are abstract data types.
Type System
defines how data types are assigned to expressions, including rules for type
equivalence and type compatibility
Structured data types
created using type operators (constructors) to form type expressions.
These operators help define complex data structures
Descriptor
memory area that holds the attributes of a variable, such as type, size, and value
Static attributes
descriptors are used only at compile time, built by the compiler as part
of the symbol table.
Dynamic attributes
descriptors must be maintained during execution and used by the
run-time system.
Primitive data types
are the fundamental types in a programming language that are not defined
in terms of other types
Integer
A common primitive numeric data type that represents whole numbers.
Floating Point
Used to model real numbers but are approximations due to their
representation using fractions and exponents (similar to scientific notation).
Complex
Represents numbers as ordered pairs (real and imaginary) of floating-point
values.
Decimal
Stores a fixed number of decimal digits with a defined decimal point position
Boolean data types
store logical values:
Character
data represents individual symbols (letters, digits, or special characters).
character string
sequence of characters (letters, numbers, or symbols) used in
programming.
Ordinal data types
characterized by their values having a clear, sequential order, much like
the positive integers.
Enumeration
types are created by explicitly listing, or "enumerating," all possible values as
named constants within the type's definition.
Subrange types
a subset of an existing ordinal type. It defines a range of
valid values within that ordinal type.
Arrays
are essential building blocks in programming, serving as a primary way to organize and
work with groups of data
Associative arrays
unlike regular arrays, use stored, user-defined keys to link to values, forming
key-value pairs.
record
is an aggregate of data elements in which the individual elements are identified by
names and accessed through offsets from the beginning of the structure.
tuple
a data type that is similar to a record, except that the elements are not named.
Lists
were first supported in the first functional programming language, LISP
Union types
programming allow a single variable to store values of different types at different
times.
Discriminated unions,
also
known as tagged unions, include an identifier (or tag) that indicates the current type of data stored.
free unions
also called untagged unions, do not
have such an identifier, making type tracking the programmer’s responsibility.
Pointer
type that holds memory addresses and a special value called nil
Reference types
function similarly to pointers but are designed with additional safety measures.
Type checking
ensures that operations in a program involve compatible data types, preventing
type-related errors.
explicit conversion
the programmer manually specifies a type conversion to ensure
the correct data type is used.
Static type checking
occurs during compilation, ensuring that all variables and
expressions are correctly typed before the program runs.
Dynamic type checking
occurs while the program is running, rather than during
compilation.
Strong typing
is a key concept in programming language design that ensures type errors
are always detected, either at compile time or run time
Type equivalence
refers to the rules that determine whether two types in a programming
language are considered the same
Type theory
significant area of study in mathematics, logic, computer science, and
philosophy
type system
consists of types and rules that govern their usage in programs.