4 ms·
But the whole point of Chesterton's Fence is that you don't immediately assume it has no purpose, you put a bit of effort into double checking. If you checked a
by iainmerrick 5y ago
But the whole point of Chesterton's Fence is that you don't immediately assume it has no purpose, you put a bit of effort into double checking. If you checked and you're confident it's useless and you can explain why to a reviewer, then sure, remove it.
Edit to add: thinking about it, I don't think I've ever found code in a legacy codebase that had literally no purpose. The closest might be code that was once used but now isn't referenced anywhere.
- Thiez 5y agoI see code without purpose all the time. I have some colleagues who seem to believe that they should assign `null` to class fields when disposing an object. And no, the object will not be recycled, and never was.
- deleted 5y ago[deleted]
- deleted 5y ago[deleted]