Structs are _usually_, but not always, passed by value, despite what [this section](https://crystal-lang.org/reference/master/syntax_and_semantics/structs.html#passing-by-value) says. Some methods that can return structs by references are: - `ReadInstanceVar` (not actual methods per se, but the two are syntactically similar) - `Pointer#value` - [defs whose body consists of a single `InstanceVar`](https://github.com/crystal-lang/crystal/pull/16303#issuecomment-3480951326) - defs whose body consists of a single `self`, unless [the def has been re-instantiated (likely a bug)](https://github.com/crystal-lang/crystal/issues/13265) Such a semantic difference could make or break a program, so we should document this conspicuously.
Structs are usually, but not always, passed by value, despite what this section says. Some methods that can return structs by references are:
ReadInstanceVar(not actual methods per se, but the two are syntactically similar)Pointer#valueInstanceVarself, unless the def has been re-instantiated (likely a bug)Such a semantic difference could make or break a program, so we should document this conspicuously.