2: Qualities
Abstract
This chapter describes the set of language-neutral qualities that define a good application programming interface (API). This includes providing a good abstraction for the problem being solved, which is illustrated with reference to a simple address book program. A good API must also hide implementation details through a combination of physical and logical hiding techniques. The quality of minimal completeness means that an API should be as small as feasible but no smaller. An API should also be easy to use, which includes facets such as being discoverable, difficult to misuse, consistent, orthogonal, and platform independent, and making appropriate use of smart pointers such as shared pointers, weak pointers, and ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access