What's the idiomatic way to move the self.x+=1 into a separate function? (From the "Function Abstraction" example)
self.counter.inc();
Where `self.counter` is a new struct that holds `x`. Because `counter` is its own struct field, I can call mutable methods on it while holding mutable references to other fields.What I've found is that often the current "object" naturally decomposes into different parts each of which can have their own methods that only need to work with their particular subset of the fields.
But to be honest that's bad code.