5: Styles
Abstract
There are several different application programming interface (API) styles that can be used to implement any given design. This chapter covers five different programming styles available to C++ developers, describing the pros and cons of each method. These include the use of a procedural flat C API, without any C++ features such as classes, namespaces, or references; object-oriented C++ APIs, which can make use of inheritance, encapsulation, and polymorphism; template-based APIs, which allow functions and data structures to be written in terms of generic types; functional APIs, which focus on declarative programming techniques using functions as a first-class concept; and data-driven APIs, which map well to Web service ...
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