![]() If you do not constrain your API functionality to a namespace, it might cause name conflicts with other APIs used in that system. Mistake # 1: Not putting your API in a namespaceīecause you have no idea in which code base your API will be used, especially for external APIs. If you really want a deep understanding of C++ API Design, you should read Martin Reddy’s book and then use the list below as more of a checklist to enforce for code review purposes. Many of the mistakes cataloged below are a combination of my own experience and things I learnt from Martin Reddy’s fantastic book C++ API Design, which I highly recommend. In fact, I highly recommend that every developer give some though on the design of their API, whether public facing or internal, as it can save you a lot in maintenance cost, provide a smooth upgrade path and save headaches for your customers. Of course, there are aspects of header file design that every C++ dev thinks about – but API design is so much more than just header file design. Consequently, performance and optimization is what occupies the thoughts of these devs eighty percent of the time. ![]() ![]() ![]() Majority of developers flock to C++ for the raw power and control it provides. For many C++ developers, API Design probably makes number 3 or 4 on their priority list. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |