13391 shaares
335 private links
335 private links
Keep public functions for public use. Internal use of public functions should be avoided because they are not meant for these cases. "By proactively making the shared implementation private, the tension is defused. "
Rationale: the goal of a public API is to provide an interface that works best at the call site. If parts of public API are re-used to implement the rest of the API, then there’s a tension between making the interface convenient for the outside user and making it convenient to use from within abstraction itself.