Skip to content
BENIBIX Learn

Strongly Typed vs Statically Typed

People think strongly typed and statically typed mean the same thing, and they do not. Static or dynamic is about when types are checked: before the program runs, or while it runs. Strong or weak is about how strict the check is: does it refuse to mix a word and a number, or quietly join them? Python is strong but dynamic. C is static but fairly weak.

Development🔤 Languages

Strongly Typed Language

A language that will not mix a word and a number on its own.

A strongly typed language will not mix values of different types unless you tell it to. If you add a word to a number, it stops with an error. A weakly typed language quietly turns one into the other and goes on. Strong or weak is not the same as static or dynamic. Python is strong and dynamic, and C is static but fairly weak.

Example
Adding the text "1" to the number 1 is an error in Python. In JavaScript, the same line gives the text "11".
Why it matters
Quiet changes cause strange bugs that are hard to find. A strong language stops at the line that is wrong.
Full entry
Development🔤 Languages

Statically Typed Language

A language that checks the type of each value before it runs.

A statically typed language checks the type of every value before the program runs. Each variable has a fixed type, like number or text. If you put the wrong kind of value in, you get an error while building, not while the app is in use. Java, C, Rust, Go and TypeScript work this way. It takes a bit more typing, but many bugs never reach users.

Example
Jack says age is a number, then tries to store the text "thirty" in it. TypeScript stops him before the code ever runs.
Why it matters
Type checks catch a whole class of bugs early. They also help editors suggest the right names.
Full entry

In one line

Strongly Typed Language
A language that will not mix a word and a number on its own.
Statically Typed Language
A language that checks the type of each value before it runs.