pub struct ObjectData { /* private fields */ }Expand description
An object: a payload and the prototype that gives it its type. Behind the
Rc a Value::Object carries, so an object is one payload word and a clone
is one refcount bump.
proto holds exactly what a Value::Module holds — the
Module terminal that is the instance — so a prototype is
code plus the environment that code runs in, and a method dispatched on an
object runs in the same environment M.name would give it. It is also the same
handle a Value::Iota’s home is, so an object and an iota answer the
nominal question (as <Module>, __proto x) identically.
data is one slot holding any value. Records with named fields are a later
feature; a map payload is the v0 idiom for several fields. It is reachable only
from the module’s own code, through __value — so a
module may change its representation without changing its interface. See
docs/done/2026-08-15_elly-objects-v0.md.