static typing

A language rule that every variable has one fixed type, known when the program is compiled, so type mistakes are caught before it runs.

In more detail

The compiler checks every assignment and call, catching many bugs at build time instead of in production. A statically typed variable declared as a number can never hold text. Many statically typed languages still infer types, so you rarely have to write them yourself.

Examples

C# is statically typed.
Go: var retries int64 = 3

Related terms

Taught in

References