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 ...
Get API Design for C++, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.