7 ms·
A natural way to separate those two types of methods is: * methods that do something *to* a Point object * methods that do something *with* a Point object
by hrjet 12y ago
A natural way to separate those two types of methods is:
* methods that do something *to* a Point object
* methods that do something *with* a Point object
The former are better to be declared inside the Point object so that they have access to internal state.
The latter shouldn't typically access internal state of the Point object.
This separation can help immensely while analyzing a code base.