> A library with hidden state, surprising defaults, or incomplete docs produces a pile of patches and failures.
Sigh.
Write a C or C++ API that works with pointers. Make it handle null pointers and errors elegantly so that the API user can safely chain calls and only check the final result. Claude decides it's better to be safe than sorry and peppers its code with intermediate nullptr and return value checks anyway.