Just for me to remember, I reiterate some type theory terminology.
- statically checked
- statically typed
Each term of a language can be classified as being of at least one (possibly more) sort (syntactic type). Statically checked programs are safe in the sense that operations are (statically) guaranteed to work only on sorts they are intended for.
Special case of a typed language with only a single sort, the universal sort, which is assigned to each term. One implication is that not many interesting assertions about unityped programs can be made statically.
XXX This is not entirely true for some implementations of those languages. They define subsorts (subtypes) of the universal sort and function types which allows type inference to some extent.
XXX Also, how do function types (cue word simply typed) fit in there?
- dynamically checked
All values are tagged. Operations at run-time are constrained (by tags) to only work on values they are intended for. A program of a tagged language is safe in the sense that violations of these constraints at run-time will not go undetected.
Languages which admit programs for which undefined behavior goes undetected, for example, operations being applied to values they are not defined for without raising an error.
Examples: C, Assembler
Other commonly heard terminology:
- strongly typed
- Term better avoided, denoting a sound type system (as opposed to unsound or none at all) and is applied to statically checked or sometimes even dynamically checked languages.
- weakly typed
- Bad term for language with unsound type system.
- dynamically typed
- latently typed
- Terms better avoided because they don't really mean types in the narrow mathematical sense. Both terms are used to mean the same as dynamically checked.
If anyone spots a mistake or can suggest better wording, do not hesitate to contact me!