A nice approach to library design is to first write the bones of a new abstraction standalone, and then flesh it out while refactoring existing code using it. One good sign an abstraction will be easy to extend later is if it’s easy to add existing functionality you’ve forgotten.
Library Design: Building Extensible Abstractions Through Iterative Refactoring
By
–