Typing discipline: Static
Static typing implies that all type checking is done during compile-time (as opposed to run-time). Types are associated with variables (as opposed to values).
Compile-time checks use only the code itself. The advantage of this approach is that it’s enough to perform the checks only once per change of program code. Once the constraint is verified, is will hold for all future executions of the program. Besides, absence of runtime checks and knowing data types at compile-time allows to make the compiled program more efficient.
Static typing allows to find type errors in rarely used code paths at compile time.
Static typing is used in most compilable programming languages.
Static typing is the opposite of dynamic typing.
- Algol W
- Algol68 (dialects: Algol68 r0, Algol68 r1, Algol68 sublanguage)
- C (dialects: ANSI C, C11, C99, K&R C)
- C# (dialects: Cω, Polyphonic C#)
- C++ (dialects: C++03, C++98)
- Haskell (dialects: Haskell 98)
- Pascal (dialects: Extended Pascal, Standard Pascal)
- Simula 67
- Standard ML
- Visual Basic (.NET)