liveBook · Manning

Dereferencing

Also called dereference operator

Dereferencing is the operation of following a pointer or reference to access the object or value it designates.

How 3 Manning books explain it

Refactoring to Rust

A pointer dereference is an operation that accesses the value stored at the memory address represented by a pointer.

How it is used
Uses dereferencing to read buffers and pass output values between Rust and C.
How deep it goes
Explains address lookup and raw-pointer safety, then demonstrates pointer arithmetic, null checks, reads, and writes.
Examples
Demonstrates reading a byte vector through an offset pointer and writing a fixed result to a C calculator’s output parameter.
What you can do after
Apply it in Rust using unsafe blocks to read a buffer or write through a C-compatible output pointer.

Read how Refactoring to Rust explains dereferencing →

Rust in Action: Systems programming concepts and techniques

Dereferencing is the operation of accessing the value designated by a pointer or reference.

How it is used
Uses dereferencing to retrieve values through references, then to expose unsafe raw-pointer memory access.
How deep it goes
Explains address-based references and unary syntax, then demonstrates NULL-pointer and segmentation-fault failures.
Examples
Uses a large-array reference, an integer-array search, raw memory scans, and printed variable addresses.
What you can do after
Apply it via Rust syntax to read values through references and diagnose why invalid raw-pointer dereferences crash.

Read how Rust in Action: Systems programming concepts and techniques explains dereferencing →

Building User-Friendly DSLs

Obtaining the target object of a relation by following a direct object reference.

How it is used
Uses direct references to navigate relationships between AST objects during normal interactions.
How deep it goes
Defines direct dereferencing and contrasts it with ID resolution, deferring actual IDs until JSON serialization.
Examples
Demonstrates an attribute reference from rentalPriceAfterDiscountInitialValue to rentalPriceBeforeDiscountAttribute.
What you can do after
Apply it via JavaScript object references to obtain related AST objects without performing ID lookups.

Read how Building User-Friendly DSLs explains dereferencing →

Also covered in

What to know first

Related concepts

Questions about dereferencing

What is dereferencing?

Dereferencing is the operation of following a pointer or reference to access the object or value it designates.

Which Manning books explain dereferencing?

Refactoring to Rust, Rust in Action: Systems programming concepts and techniques and Building User-Friendly DSLs.

What should I know before learning dereferencing?

Manning books that teach dereferencing usually introduce memory location and reference first.

What is the difference between dereferencing and volatile access?

Dereferencing is the operation of following a pointer or reference to access the object or value it designates. A volatile access is a read or write of a volatile-qualified object that the language requires implementations to preserve as an observable memory operation.

What is dereferencing a kind of?

Dereferencing is a kind of unary operator. A unary operator is an operator that applies an operation to exactly one operand and produces a result.

What is dereferencing also called?

Dereferencing is also called dereference operator.

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.