Static Typing

noun

say it: “STAT-ik TYPE-ing” /ˈstætɪk ˈtaɪpɪŋ/

Every variable having one fixed type that the compiler checks before the program runs.

What is Static Typing?

Static Typing — Every variable has one type, fixed when it's declared, and the compiler checks every use before the program runs. C#, Java and TypeScript are statically typed, so putting text in a number variable is caught at build time.

int pages = 412;
pages = "many"; // compile error: can't convert string to int

In a sentence

  • “Thanks to static typing, C# caught me putting text in a number variable before I ran anything.”

Level: Apprentice · More Software Development terms at this level

Updated