Bryan Martin
Mar 9, 2023

--

Very superficial explanation of data types in modern programming languages. All modern programming languages have types. There no longer exists a binary choice between typed and untyped:

Type Safety

The extent to which a programming language discourages or prevents type errors.

Strongly typed - Types must be compatible and/or equivalent in order to avoid a type error.

Weakly typed - Runtime may coerce types that are not equivalent, but are compatible.

Type Expression

Explicit - Type is explicitly stated with the declaration of a field or variable.

Implicit - Type is inferred from assignment

Type Compatibility/Equivalence

Nominal - Compatibility and/or equivalence is determined by name.

Structural - Compatibility and/or equivalence is determined by structure.

Type Checking

Static - Types are checked during parsing or compiling.

Dynamic - Types are checked during execution.

--

--

Responses (1)