3 ms·
I've seen one reason to keep old code in: if the new implementation is complicated and the old one is short and simple, keep the old one as documentation for ho
by ivank 16y ago
I've seen one reason to keep old code in: if the new implementation is complicated and the old one is short and simple, keep the old one as documentation for how the new one essentially works.
- anthonyb 16y agoThis is exactly what I do when writing complex code, and is about the only reason that I can think of to comment out code like this. The other time that I might do it is when I'm trying a couple of implementations to see which one is better. But leaving commented out code in there is just asking for trouble. What happens when someone comments it back in 6 months later?