How to make sure that the code still works after refactoring (i.e. after changing the variable name)?
In a static language, if a class is renamed, but there is no other reference class, then I will get a compilation error.
But in a dynamic language there is no such security system, and your code may break during refactoring if you are not careful enough . You can use unit test, but when you use mocks, it is quite difficult to know the name changes, and as a result, this may not help.
How to solve this problem?
python php dynamic-languages
Graviton
source share