Hacker News new | past | comments | ask | show | jobs | submit login

I can see his point: deleted code is really hard to discover. You can fetch it if you know it's there, but how do you find it in the 1st place?

With that being said, commented code is rarely useful and it cna be a liability indeed.




Commented out code in downstream forks is particularly bad as it either generates spurious merge problems ( // style commenting means you’ll have to do manual resolution for every line in the commented out sections) or hides real changes altogether (/* */ comments allow whole new functions to be added inside the commented region and go unnoticed - which might cause a compilation failure, but might also just result in different method resolution).

Maybe put a comment about the removal if you want something that can easily lead back to the commit which did it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: