2 ms·
> private methods are part of an internal API for the class that is used by your future self and coauthors Indeed. In a good code, one could say it's libraries
by magicalhippo 5y ago
> private methods are part of an internal API for the class that is used by your future self and coauthors
Indeed. In a good code, one could say it's libraries all the way down.
For example, I've refactored a lot of business code such that it can be easily re-used in different parts of our application. Ta-da, I effectively have created a piece of library code, and I'll want to write tests for it to make sure it doesn't break any consumers, current or future.