liveBook · Manning

Dynamic typing

Also called dynamically typed, dynamic type

Dynamic typing is a typing discipline in which type information and checks are determined primarily at runtime rather than fixed statically for variables.

How 6 Manning books explain it

Julia as a Second Language

Dynamic typing is a type system property in which type checking is performed primarily at runtime rather than before execution.

How it is used
Motivates interactive development and Julia’s approach to the two-language problem in performance-sensitive computing.
How deep it goes
Explains runtime type checks and sketches boxing and field-access overhead with illustrative pseudocode rather than an exact implementation.
Examples
Uses interactive dataset exploration, neural-network components, and vector-scaling pseudocode to illustrate dynamic workflows and runtime checks.
What you can do after
Evaluate dynamic typing’s tradeoffs for interactive development and performance-sensitive workloads.

Read how Julia as a Second Language explains dynamic typing →

Python Workout: 50 ten-minute exercises

Dynamic typing is a type system property in which an object's type is determined and checked at runtime rather than declared statically for each variable.

How it is used
Uses shared operations to write generic functions that accept multiple input types and can produce corresponding output types.
How deep it goes
Explains variables without fixed types through worked sequence examples, stopping short of implementation internals.
Examples
Demonstrates first-last extraction, thresholded sums, numeric conversion, dictionary merging, and index-based sequence exercises.
What you can do after
Build it from scratch by writing functions that handle related operations across several compatible types.

Read how Python Workout: 50 ten-minute exercises explains dynamic typing →

Python Workout, Second Edition

Dynamic typing is a type system in which values have runtime types and names can refer to values of different types without fixed variable declarations.

How it is used
Uses shared operations to replace multiple type-specific functions with generic functions accepting varied inputs.
How deep it goes
Explains variable and data typing through indexing, slicing, and generic functions, but does not descend into runtime implementation internals.
Examples
Demonstrates firstlast across strings, lists, tuples, and exercises involving numeric, textual, file-like, and dictionary inputs.
What you can do after
Build generic Python functions that operate across compatible types and preserve sequence types when using slices.

Read how Python Workout, Second Edition explains dynamic typing →

Practices of the Python Pro

Dynamic typing is a type-system property in which data types are determined or checked during program execution rather than before execution.

How it is used
Uses runtime type determination to support duck typing, polymorphism, debugging, and flexible object interactions in Python.
How deep it goes
Explains runtime behavior, duck typing, inspection tools, and type hints, but stops short of detailed type-system internals.
Examples
Demonstrates runtime method calls, AttributeError, and type(), isinstance(), and issubclass() inspections.
What you can do after
Diagnose/debug with it by inspecting runtime objects and design Python interactions around supported behavior rather than rigid class hierarchies.

Read how Practices of the Python Pro explains dynamic typing →

Essential TypeScript 5, Third Edition

Dynamic typing is a language system in which values carry types at runtime and a variable can refer to values of different types over time.

How it is used
Explains JavaScript runtime behavior and the flexibility of variables and function parameters.
How deep it goes
Demonstrates reassignment, typeof inspection, built-in types, and coercion consequences, but does not develop a formal type system.
Examples
Uses reassigned variables, price comparisons, typeof output, and a calculateTax function called with three value types.
What you can do after
Diagnose unexpected values by inspecting runtime types and recognizing coercion-related results such as NaN.

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

Elixir in Action, Third Edition

A dynamic language is a programming language in which important type checks or type determinations occur at runtime rather than being fully enforced statically.

How it is used
Explains how Elixir represents variables and function types without requiring declarations.
How deep it goes
Defines runtime type determination, then reaches documentation and static analysis through typespecs without developing a static type system.
Examples
Uses rebinding of a salary value and numeric Circle functions with optional typespec declarations.
What you can do after
Evaluate runtime typing and document function contracts with typespecs and Dialyzer.

Read how Elixir in Action, Third Edition explains dynamic typing →

Also covered in

What to know first

Related concepts

Questions about dynamic typing

What is dynamic typing?

Dynamic typing is a typing discipline in which type information and checks are determined primarily at runtime rather than fixed statically for variables.

Which Manning books explain dynamic typing?

Julia as a Second Language, Python Workout: 50 ten-minute exercises, Python Workout, Second Edition, Practices of the Python Pro, Essential TypeScript 5, Third Edition and Elixir in Action, Third Edition.

What should I know before learning dynamic typing?

Manning books that teach dynamic typing usually introduce Python, JavaScript, garbage collection and function first.

What is the difference between dynamic typing and static typing?

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

What kinds of dynamic typing are there?

Kinds of dynamic typing include Elixir and Python.

What is dynamic typing also called?

Dynamic typing is also called dynamically typed or dynamic type.

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.