3 ms·
Refactorings are used to adapt your code to newly acquired knowledge and/or changed requirements. That are things that CAN'T BE PLANNED because you simply don't
by emsy 12y ago
Refactorings are used to adapt your code to newly acquired knowledge and/or changed requirements. That are things that CAN'T BE PLANNED because you simply don't know them yet. Therefore you can't plan how minimal you'll have to refactor.
Let's take the "rename function" refactoring. You claimed sed was sufficient. What about functions with the same name in different namespaces or different visibilities?
The same goes for move parameter. Sometimes you want to move a parameter so the order adheres to a guideline that you've accidentially forgotten or that newly emerged. Again: What about ambiguos function names?
Refactorings such as pull method up (e.g. to create an interface)/ push method down are probably not even possible with sed.
Those are small and manageable refactorings. But even a small refactoring such as rename function can mess up your code if not done correctly.