4 ms·
No! Never change the behaviour and the implementation at the same time! It is the same for a class or function or monoid or whatever. API change and implementat
by nevertoolate 6y ago
No! Never change the behaviour and the implementation at the same time! It is the same for a class or function or monoid or whatever. API change and implementation change should never happen at the same time. If you covered the old behaviour with tests (on the appropriate granularity) you can refactor the IMPLEMENTATION and verify that the systems tested invariants hold buy running the tests. There are a lot of books written about this but really the main idea is this simple.