liveBook · Manning

Static typing

Also called static type system, static type checking

Static typing is a typing discipline in which program types are determined or checked before execution, typically through compilation or static analysis.

How 13 Manning books explain it

Essential TypeScript 5, Third Edition

A static type is a type checked for program values and expressions during compilation rather than only during execution.

How it is used
Constrains JavaScript value use during TypeScript development so incompatible arguments and operations can be reported by the compiler.
How deep it goes
Works through annotations and inference with compiler errors, then identifies unions, guards, special types, and configurable null checking.
Examples
Uses tax calculations and a to-do collection to expose wrong argument types and a string result used in arithmetic.
What you can do after
Apply it via TypeScript annotations and inference to detect incompatible values before running the compiled JavaScript.

Read how Essential TypeScript 5, Third Edition explains static typing →

Acing the Frontend Interview

Static type checking is the compiler-time analysis of code to detect violations of declared or inferred type constraints.

How it is used
Frames TypeScript as a practical foundation for safer, scalable frontend and full-stack application development.
How deep it goes
Covers compile-time checking, narrowing, assertions, strictness, declaration files, and global augmentation rather than runtime behavior.
Examples
Uses a React YouTube API integration, Window augmentation, typed callbacks, and incorrect state assignments as concrete examples.
What you can do after
Apply it via TypeScript to catch errors early, type JavaScript APIs, configure strictness, and refactor code more safely.

Read how Acing the Frontend Interview explains static typing →

Rust Servers, Services, and Apps

Static typing determines and checks program types before execution, generally during compilation.

How it is used
Uses compile-time type checking to support safe application backends and software infrastructure services.
How deep it goes
Defines compile-time checking and inference, but does not descend into compiler implementation or type-system internals.
Examples
Uses unspecified variable types, compiler inference, unresolved types, and conflicting type constraints as examples.
What you can do after
Evaluate programs for type correctness before execution and interpret compiler feedback about inference failures or conflicts.

Read how Rust Servers, Services, and Apps explains static typing →

Functional Design and Architecture: Examples in Haskell

A statically typed language checks the types of program constructs before execution, typically during compilation.

How it is used
Uses compile-time types to design valid-by-construction functional programs and reduce reliance on debugging.
How deep it goes
Explains compiler-gated error classes and domain modeling with algebraic data types, but does not detail type-system implementation internals.
Examples
Uses Shape and area definitions, an invalid area call, a compiler mismatch, and measurement-unit errors as examples.
What you can do after
Evaluate and design domain models that let compilers reject mismatched operations before execution.

Read how Functional Design and Architecture: Examples in Haskell explains static typing →

React in Depth

A static type is a type assigned and checked during program analysis before the code executes.

How it is used
Uses static typing to catch mismatches before execution and make React code more reliable and maintainable.
How deep it goes
Works through parameter annotations, inference, unions, and component props, but does not detail type-checker internals.
Examples
Tests a Fibonacci function with invalid arguments, restricts status values, and defines React component props.
What you can do after
Apply it via TypeScript to annotate function parameters and React props, infer result types, and catch incompatible values.

Read how React in Depth explains static typing →

Grokking Simplicity

A type system that checks and constrains the types of program expressions before execution.

How it is used
Uses compile-time constraints to catch invalid field names and other type mistakes before execution.
How deep it goes
Defines compile-time checking and contrasts it with run-time checking, but does not explain type-system internals.
Examples
Uses field-name strings, TypeScript, Java enums, Haskell discriminated unions, and a JavaScript run-time validation alternative.
What you can do after
Evaluate whether compile-time checks or run-time checks better protect names and types in a chosen language.

Read how Grokking Simplicity explains static typing →

F# in Action: A Revised Edition of Get Programming with F#

A static type system assigns and checks types during compilation rather than primarily during program execution.

How it is used
Supports concise F# application code and domain models while helping the compiler catch potential mistakes during development.
How deep it goes
Defines compiler-enforced types and illustrates inference through function composition, but defers a fuller explanation of inference and composition.
Examples
Contrasts C# and F# even-number functions and uses distinct City and Country types to illustrate safer address modeling.
What you can do after
Apply it via the F# compiler to model distinct domain values and catch mismatched uses while writing code.

Read how F# in Action: A Revised Edition of Get Programming with F# explains static typing →

100 Java Mistakes and How to Avoid Them

A static type system determines and checks the types of program expressions before execution.

How it is used
Uses compile-time type checking to prevent avoidable cast failures and make variable, parameter, and return-type contracts more precise.
How deep it goes
Explains safer declarations, guarded casts, inspections, and generic type-erasure delays, but does not develop type-system internals.
Examples
Uses Object-to-String processing, equals implementation, generic iteration, and IntelliJ IDEA cast inspections as concrete cases.
What you can do after
Apply it by choosing concrete types, guarding required casts, adopting pattern matching, and reviewing unchecked-cast warnings contextually.

Read how 100 Java Mistakes and How to Avoid Them explains static typing →

Kotlin in Action, 2E

Static typing is a language discipline in which the type of every expression is determined at compile time.

How it is used
Uses compile-time type knowledge to catch invalid member access, inconsistent calls, and selected run-time failures earlier.
How deep it goes
Explains compiler checks, inferred declarations, static extension dispatch, nullability, and type checks, without detailing compiler internals.
Examples
Uses inferred integer variables, View and Button dispatch, nullable strings, and Any-to-String type checks.
What you can do after
Apply Kotlin’s type system through inferred declarations, nullable types, compiler-checked calls, and statically resolved extensions.

Read how Kotlin in Action, 2E explains static typing →

Julia as a Second Language

Static typing is a language property in which types are associated with expressions and checked before a program runs.

How it is used
Contrasts static typing with dynamic typing to motivate Julia’s combination of flexibility and performance.
How deep it goes
Defines when type checks occur and discusses practical tradeoffs, without developing formal type-checking rules.
Examples
Uses large-dataset analysis and a Fortran climate-model port to illustrate workflow and performance comparisons.
What you can do after
Evaluate static typing’s early error checking and performance role against the flexibility of dynamic typing.

Read how Julia as a Second Language explains static typing →

Go in Practice, Second Edition

Static typing determines and checks program types through analysis before execution, typically during compilation.

How it is used
Uses static analysis to check Go program types before execution while supporting practical development of large systems.
How deep it goes
Defines compile-time-oriented checking and contrasts runtime typing, but stops short of compiler internals or a detailed type-system formalization.
Examples
Illustrates explicit and inferred Go declarations alongside comparisons with Python, PHP, JavaScript, and TypeScript.
What you can do after
Evaluate/understand how Go checks types statically while retaining selected conversion and type-switching conveniences.

Read how Go in Practice, Second Edition explains static typing →

Learn Haskell by Example

Static typing is a language property in which types are determined or checked before program execution and do not change dynamically during runtime.

How it is used
Frames compile-time checking as a safety mechanism while structuring Haskell data and function definitions.
How deep it goes
Defines compile-time type checking, runtime type stability, inference, and explicit signatures without descending into compiler internals.
Examples
Uses Haskell signatures such as `name :: type`, inferred definitions in GHCi, and the expression `x * x`.
What you can do after
Evaluate/understand how compile-time checks and inferred or explicit types constrain Haskell definitions.

Read how Learn Haskell by Example explains static typing →

Pro Angular 16

Static typing is a language feature in which declared or inferred types are checked before program execution and incompatible assignments can produce compiler errors.

How it is used
Uses static typing to define Angular application data models and make JavaScript development more familiar to C# and Java developers.
How deep it goes
Explains the TypeScript-to-JavaScript compilation relationship and demonstrates typed model fields, but defers comprehensive language coverage.
Examples
Demonstrates typed TodoItem and TodoList classes with string, boolean, array, and readonly collection types.
What you can do after
Build it from scratch by defining simple TypeScript data models that compile into browser-executable JavaScript.

Read how Pro Angular 16 explains static typing →

Also covered in

What to know first

Related concepts

Questions about static typing

What is static typing?

Static typing is a typing discipline in which program types are determined or checked before execution, typically through compilation or static analysis.

Which Manning books explain static typing?

Essential TypeScript 5, Third Edition, Acing the Frontend Interview, Rust Servers, Services, and Apps, Functional Design and Architecture: Examples in Haskell, React in Depth, Grokking Simplicity, F# in Action: A Revised Edition of Get Programming with F#, 100 Java Mistakes and How to Avoid Them and 5 more.

What should I know before learning static typing?

Manning books that teach static typing usually introduce JavaScript, object-oriented programming, Python and dynamic typing first.

What is the difference between static typing and dynamic typing?

Static typing is a typing discipline in which program types are determined or checked before execution, typically through compilation or static analysis. Dynamic typing is a typing discipline in which type information and checks are determined primarily at runtime rather than fixed statically for variables.

What kinds of static typing are there?

Kinds of static typing include Kotlin, F# and Go.

What is static typing also called?

Static typing is also called static type system or static type checking.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.