I wonder if it would be practical to add an implementedBy
keyword to PHP or other OO programming languages. I imagine it could help a lot with keeping application code decoupled from third party library code, and following the interface segregation principle.
For instance if I work at Acme and I want to use the Money PHP library, but not couple my code to it directly, I could write an interface with just the methods I need:
<?php
namespace Acme;
interface Money implementedBy \Money\Money
{