Back To Schedule

The Most Important API Design Guideline

No, It's Not That One

14:30 - 16:00 Thursday 2nd May 2024 MT Bethe Hall
Beginner
Intermediate
Advanced
API Design

Scott Meyers has famously proclaimed that the most important general design guideline is to make interfaces easy to use correctly and hard to use incorrectly. I don't dispute that claim, for the general case. However, for the specific case of an API, and in particular C++ library code, this guideline must take a back seat to something else.

So, what should that something else be? Obviously, since the above paragraph mentions C++ specifically, it must relate to performance in some way. Could it be to make interfaces as efficient as possible? If not, then what in the world could it be?

This talk will take a brief survey of general software design guidelines. Then, we will look at some specific examples. For some libraries, like the standard library, the design guidelines are well documented. For others, like many boost components, the design guidelines are part of the documentation. For others, we need to actually look at the API to see if we can determine the design guidelines that were used, if indeed, any guideline was used at all.

Finally, I will discuss what I believe to be the most important design guideline, and the implications for how we design and implement software in C++. In support of this claim, I will also present some patterns that can be used to effectively achieve this (and other) design goals.

View Slides

Jody Hagins

Director, Software EngineeringMayStreet/LSEG

Jody Hagins started using C++ back in the mid 1980s, with cfront. In 1993, he enjoyed writing enough C++ support code to enable writing loadable unix device drivers in C++. Since then, he has been applying C++ to various problems within the fintech space.