Mutating a struct secretly performs reassignment?

Exactly what Slava said.

You may be interested in the yielding coroutine accessors pitch which would formalize _modify into a full-fledged language feature.

5 Likes