liveBook · Manning

Type checking

Type checking is the process of determining whether values, expressions, or operations conform to the rules or constraints of a type system.

How 5 Manning books explain it

Kotlin in Action, 2E

A type check is a Kotlin operation that tests whether a value has a specified runtime type.

How it is used
Uses `is` to select subtype-specific behavior while safely accessing members in the successful branch.
How deep it goes
Explains smart casts and their stability constraint, then details runtime limits caused by generic type erasure.
Examples
Demonstrates recursive `Expr` evaluation, checking an `Any` value for `String`, and distinguishing lists from sets.
What you can do after
Apply `is` and smart casts for subtype handling while avoiding invalid assumptions about erased generic arguments.

Read how Kotlin in Action, 2E explains type checking →

The Quick Python Book, Fourth Edition

Type checking is the analysis of program values and operations to detect whether they conform to expected types.

How it is used
Uses checks to reject mismatched values in functions, methods, and type-restricted collections.
How deep it goes
Works through collection initialization and indexed assignment, then flags constructor paths that can bypass assignment checks.
Examples
Compares string and integer types and builds a list that rejects elements of the wrong type.
What you can do after
Build it from scratch in a typed list, or adapt a built-in collection while checking its insertion paths.

Read how The Quick Python Book, Fourth Edition explains type checking →

Essential TypeScript 5, Third Edition

Type checking is the analysis of program values and expressions to determine whether their types satisfy language rules.

How it is used
Uses static analysis to catch incompatible values while developing TypeScript, JavaScript integrations, and React applications.
How deep it goes
Explains annotations, inference, unions, narrowing, object shapes, and configuration, while stopping short of compiler implementation internals.
Examples
Uses a cart formatter receiving strings, an ensuing toFixed runtime error, and a React tsconfig with strict and noEmit.
What you can do after
Diagnose/debug with it by identifying unchecked JavaScript boundaries and separating TypeScript type errors from Babel transformation.

Read how Essential TypeScript 5, Third Edition explains type checking →

Julia as a Second Language

Type checking is the process of verifying that operations are applied to compatible types.

How it is used
Enforces compatible argument and field types at runtime while retaining Julia’s dynamic typing.
How deep it goes
Demonstrates checks through a parametric method and typed fields, but defers detailed treatment of performance costs.
Examples
Uses a linear search that rejects a string search value for an integer vector, plus typed and untyped two-dimensional vector structs.
What you can do after
Apply it via Julia parametric methods and structs to require matching argument or field types.

Read how Julia as a Second Language explains type checking →

Refactoring to Rust

Type checking is the process of verifying that values and operations conform to the rules of a type system.

How it is used
Uses typed Rust structs to validate JSON data during deserialization.
How deep it goes
Explains inference, trait requirements, and runtime mismatch errors, but defers broader Serde configuration options.
Examples
Demonstrates typed `Data` structs, compiler diagnostics, and a JSON string whose `name` field incorrectly contains text.
What you can do after
Diagnose JSON type mismatches using compiler messages and Serde's line-and-column runtime errors.

Read how Refactoring to Rust explains type checking →

Related concepts

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.