A good thing to think about.
by Jonathan Boccara
From the article:
Just because we can provide an interface doesn’t mean that we should.
At least this is one of the takeaways that I got from from Howard Hinnant’s opening keynote at Meeting C++ 2019.
In this impressive keynote, Howard made a presentation about <chrono> and the host of features it brings in C++20. But beyond showing us how to use <chrono>, Howard explained some of the design rationale of this library.
Those are precious lessons of design, especially coming from someone who had a substantial impact on the design of the standard library. I believe we can apply those practices to our own code when designing interfaces.
So, just because we can provide an interface doesn’t mean that we should. To illustrate what this means in practice, let’s go over two examples in the C++ standard library...