3 ms·
> If you change the interface, it creates problems (e.g. unit testing gives you confidence to refactor, but if you change interfaces, you also have to change th
by ankrgyl 15y ago
> If you change the interface, it creates problems (e.g. unit testing gives you confidence to refactor, but if you change interfaces, you also have to change the tests...).
Could you elaborate on this point? If you change the behavior of a dynamic module A, i.e. its implicit interface, you'd have to change its unit tests to reflect these changes anyway...
- 6ren 15y agoYes, that's correct. I was addressing the selling point of unit tests, that they give you a safety net to ensure your changes don't introduce new bugs. The claim fails when the interface changes. In my experience, interface changes happen quite often. When you prevent them from changing, you end up with back-compatibility hell, that popular platforms like x86, Windows and Java have to maintain - and that's just for external, public interfaces.