
API design for C++
by Martin Reddy · first published 2011
8mentions
6recommended by
7HN commenters
2011–2022first – last mentioned
86% recommend14% neutral
Why HN recommends it
Covers C++ API design in practical detail, including function construction, parameter passing, and general design guidance; praised as a reference for engineers building or maintaining C++ libraries.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.







…focusing on this area - the author calls it construction - and goes into detail about building functions, parameter passing and so on and so forth. Another interesting book I read was Martin Reddy’s - API design for C++. You could try finding something similar for your chosen language. Finally there’s a couple of books by Pete Goodliffe which are language-independent: Code Craft and Becoming a Better Programmer. Naming,…
on “Ask HN: Should I learn Rust or Go?” ↗API Design for C++ - Martin Reddy
on “Ask HN: Best book you read in 2011” ↗I would give "API design for C++" by Martin Reddy a shot. The only thing I remember now from the large scale book is to pay attention to compile-time and link-time dependencies, although when I read it I remember that it contained…
on “Organizing complexity is the most important skill in software development” ↗For C++ APIs, "API Design for C++" from Martin Reddy: http://www.apibook.com/blog/
on “Ask HN: What are good reads for designing APIs?” ↗…and C++ Template Metaprogramming are likely to be the most challenging. Don't get me wrong, they are fantastic works, but are probably not what you need right now. C++ Primer, C++ Common Knowledge, and API Design for C++ are books that I think you should consider that are not listed in the post above. If you have never studied computer architecture it is an important subject to understand. There are good books like…
on “Ways to Get Better at C++” ↗…CMake, and Bazel. Hopefully that’ll give you an idea of what a modern C++ project actually looks like, and will help you start your own. For books I’d like to add to the current top comment (may go away) API Design for C++. It’s a great reference on exactly what it sounds like.
on “Ask HN: Best way to learn modern C++?” ↗…improving your working memory as being able to remember the seemingly ok code 10 frames ago that conflicts with what's in front of you could be the key. try: Working Effectively with Legacy Code Martin, R. API Design for C++ Reddy, M. Were both full of indispensable advice.
on “Ask HN: Good books on debugging?” ↗…[Elsevier](http://store.elsevier.com/) 100 selected DRM-free e-titles are available for only $1 each, with promo code ONESALE for books listed on [this page](http://store.elsevier.com/coArticle.jsp?pageid=17600012) which include: * API Design for C++, 1st Edition (released 2011) * CUDA Application Design and Development, 1st Edition (r. 2011) * Data Mining: Practical Machine Learning Tools and Techniques, 3rd Edition (r. 2011) * Private Cloud…
on “Black Friday and Cyber Monday book/ebook deals and $1 selected Elsevier titles” ↗