Static Typing
PronunciationSTAT-ik TY-ping
Definition
Static typing means types are known and checked before the program runs, usually when the code is compiled or analysed.
Where you hear it
When comparing languages such as Java and TypeScript with Python and JavaScript, and in arguments about safety versus speed of writing.
Examples
Static typing caught the wrong argument before we deployed.
TypeScript adds static typing on top of JavaScript.
The static type checker flags the wrong argument before the code ever runs.
Common mistake
Thinking static typing means no bugs. It catches a class of mistakes, but logic errors still need tests.
Don't confuse with
Dynamic typing, where the type belongs to the value and is checked while the program runs.
Say it at work
- In a meeting or chat
Static typing would have caught this at build time.
- In an email or ticket
We chose a statically typed language for the core service.
Keep exploring
More in Programming Fundamentals