June 2021
Intermediate to advanced
398 pages
9h 35m
English
At the most abstract level, there are two different strategies for dealing with type information in a programing language: statically or dynamically.
A language with static types requires that each variable be assigned a type when it is first declared. The language expects to know what the type of a value is and uses that information to constrain at compile time what values can be assigned to that variable.
Different static languages have different requirements for how types are assigned. Some languages, like Java, require the type of every variable to be explicitly stated when the variable is declared. Other languages, like TypeScript, allow for type inference. In TypeScript, if you assign a variable with a typical ...