another stab at a C++ API design