Skip to content

Tensions in Practice: Simple value transport in tension with shared identity

Scene save · two surfaces sharing one mutable material

Two surfaces refer to one material. Saving each field value and loading two equal copies can preserve what the scene initially looks like, yet change its behavior: editing one material no longer updates both surfaces. An identity table records that the references originally met at one object and reconstructs that sharing. It preserves a stronger relation at the cost of reference bookkeeping.

Keep the transport format simple

Send the required values without extra graph-identity machinery when independent copies suffice.

Preserve shared-object behavior

Restore the fact that two references reach one mutable object, not just equal values.

Why these aims pull against each other

Value equality immediately after loading does not establish identity equivalence. The difference becomes visible when one of the apparently equal materials is changed.

Compare the arrangements

Load equal copies

Inline the material value for each surface and reconstruct independent copies.

What it protects
A consumer needing only independent value snapshots can use a simpler representation.
What it costs
The original sharing is lost; a later material edit reaches only one surface.
When it fits
Fits an explicitly value-only round-trip contract where independent snapshots are intended and shared mutation is not required.

Illustration note: The example deliberately weakens the equivalence contract. It is not a conforming replacement for an application that promises shared identity.

Restore one object

Assign the material a portable id, encode both references using that id, and resolve them to one reconstructed object.

What it protects
Shared mutation behavior survives the save/load round trip.
What it costs
The encoder and decoder maintain ids and reference resolution; incorrect identity criteria can accidentally merge distinct objects.
When it fits
Fits a graph-aware format whose consumers rely on shared objects and can implement the identity mapping correctly.

Illustration note: The selected graph has sharing but no cycle. The drawing claims only this sharing behavior, not arbitrary type/schema fidelity or safe loading of untrusted executable formats.

What this illustration does—and does not—establish

Serialization: Round-Trip Fidelity versus the Equivalence It's Up To (what "the same" means) supplies the chosen-equivalence boundary. Object-Graph Identity Table supplies the concrete shared-material example and identity bookkeeping cost.

  • Original runtime memory addresses are not sent as usable pointers; the portable id belongs to the serialization contract.
  • Two independently created objects with equal fields must not be merged merely because their values match.
  • Graph identity does not establish that the underlying material content is correct.

Source entries

Serialization

Prime · Source of the tension

Serialization: Round-Trip Fidelity versus the Equivalence It's Up To (what "the same" means) supplies the conflict examined here.

Round-Trip Fidelity versus the Equivalence It's Up To (what "the same" means)

The failure mode is assuming "it round-trips" means full recovery when it only preserves equivalence under a weaker relation (JSON recovering values but not shared object identity, a contract recovering terms but not tone).

Read the source section

Object-Graph Identity Table

Mechanism · Related concept

Supplies portable ids, restored shared references and the material-edit example.

When it helps, and when it misleads

The classic misuse is assuming value equality implies identity preservation — a serializer can round-trip every field yet destroy sharing. The guarding discipline is to test explicitly for shared-node and cycle survival, not just field equality, using a graph-aware equivalence check.

Read the source section

When it helps, and when it misleads

It also adds bookkeeping and a two-pass load, and a stale or non-deterministic id scheme undermines diffs and caching.

Read the source section