liveBook · Manning

Mutable object

A mutable object is an object whose state can be changed after it is created.

How 4 Manning books explain it

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

Mutability is the property of data whose state can be changed after creation.

How it is used
Contrasts stateful object updates with explicit state-passing to motivate immutable F# design.
How deep it goes
Explains mutation through object models, debugging risks, F# syntax, and a worked gas-tank comparison.
Examples
Uses unreproducible bugs, multithreaded race conditions, a mutable car gas tank, and scoped StringBuilder accumulation.
What you can do after
Evaluate/understand when in-place state changes obscure behavior and when explicit returned state improves testability.

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

Refactoring to Rust

Mutability is the property of a value or data structure that permits its contents to be changed after creation.

How it is used
Uses explicit mutability to control reassignment, in-place updates, and growing string buffers.
How deep it goes
Explains annotations, mutable references, scope-based reference dropping, String capacity, and reallocation without covering concurrent Rust details.
Examples
Uses integer variables, an artwork view counter, repeated string appends, and preallocated string capacity.
What you can do after
Apply it by declaring mutable Rust variables, passing mutable references, and choosing string capacity for repeated appends.

Read how Refactoring to Rust explains mutable object →

Julia as a Second Language

A mutable type is a Julia type whose instances can have their fields modified after creation.

How it is used
Enables functions and collection-like operations to update fields of Julia composite objects after construction.
How deep it goes
Defines mutability, demonstrates field updates, and explains why changing a type definition requires restarting the REPL.
Examples
Uses an archer spending arrows and a staged rocket adding or removing stages.
What you can do after
Build it from scratch: define a mutable struct and write functions that update its fields.

Read how Julia as a Second Language explains mutable object →

Fabulous Adventures in Data Structures and Algorithms

A mutable data structure is a data structure whose contents can be changed after it is created.

How it is used
Uses mutation for convenient construction and direct updates when preserving multiple historical states is unnecessary.
How deep it goes
Defines mutation, contrasts copying costs, and demonstrates encapsulated C# trie-node operations without developing a general mutation theory.
Examples
Uses integer arrays, mutable trie nodes, and command-based undo-redo state as concrete examples.
What you can do after
Evaluate when direct mutation is simpler than version sharing, and build encapsulated mutable trie nodes in C#.

Read how Fabulous Adventures in Data Structures and Algorithms explains mutable object →

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.