The linked Dyon book contains an explanation to just that:
Lifetimes are about references
A lifetime is about the references stored inside a variable. All references outlive variables they are stored in. Variables can not store references to themselves, because it can not outlive itself.
In order to put a reference inside a variable, the lifetime checker must know that the reference outlives the variable.
Because of the lifetime checker, all memory in Dyon is an acyclic graph.
Therefore, the main limitation is that references cannot make any cycles. That is, it is not possible to represent circular node lists or having a child object keep a reference to its parent.
These limitations also apply to Rust, with the exception that Rust also provides workarounds. Reference-counted types (Rc
and Arc
), in combination with weak references (see std::rc::Weak
), can create circular references. Cycles can also be made behind unsafe
constructs, namely raw pointers.
See also (Rust specific, but most principles apply):