Wado

WEP: Iterator Reference Model

Align List iteration with Rust's iter / iter_mut / into_iter.

Context

The friction driving this WEP is that Wado's iterator methods diverge from Rust's, so Rust muscle memory misfires:

Reference iteration exists only via for-of &list (Item = &T), not through a named method a Rust reader reaches for. The fix is to match Rust's surface. Inventing a new divergence (e.g. making owned for-of list yield &T) would only move the friction elsewhere, so it is out of scope.

Decision

Match Rust's conventions exactly:

Rejected — flipping owned for-of list to &T (and dropping the value iterator): Rust's owned for x in v yields values, so this would add a new Rust divergence, the opposite of the goal. It also turns snapshot-copy iteration into live-reference iteration, a silent hazard when the body mutates the list.

Rejected — operator auto-deref: making &T read as T in operators is unsafe, because == on &T today compares reference identity, not value (&a == &b is false for distinct variables both holding 5). Auto-deref would silently turn every &T == &T into a value comparison and remove identity testing via ==. Primitives use copied() or *x instead. Reference value-vs-identity is a separate proposal.

Consequences

Status

TODO