“If I could go back in time and had the power to change C++, rather than adding virtual function, I would add language support for type erasure …” (Eric Niebler, June 19, 2020, Twitter).
For many C++ developers type erasure is superior to inheritance. And indeed, it has proven itself to be a powerful design pattern, helping to significantly reduce coupling between software entities.
This talk will give a short introduction to type erasure, with a particular focus on the design aspect of the technique. It will explain why type erasure provides such a strong decoupling and why this makes it superior to inheritance in terms of dependency management.
Please login to comment