DELAPARRA
Index
Color
NL
Category: Core glossary

Type checking

Explained by Updated

What is Type checking?

Type checking: Verifying that values in a program are used consistently with their declared types. Static type checking happens at compile time (TypeScript, Java); dynamic type checking happens at runtime (Python, JavaScript). Type checking verifies that values are used according to their types: that a function expecting a number does not receive a string, or that a method you call actually exists on the object.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Type checking

How is Type checking used in practice?

Static type checking happens before the code runs, as in TypeScript, Java or C#, or with tools like PHPStan and Psalm for PHP. Dynamic type checking happens at runtime, when the operation is attempted.

What should you keep in mind with Type checking?

Static checks catch whole categories of bugs early, such as null values where an object was expected or misspelled properties, and make editors smarter with better autocompletion. PHP has gained strong type declarations over the years, and combining them with PHPStan at a high level gives much of the safety of a compiled language. Running these checks in CI keeps the benefit for the whole team.

At a glance

CategoryCore glossary
Explained by
Updated

More Core glossary terms

All terms starting with T

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.