Sujet : Re: Block Comments Or Rest-Of-Line Comments?
De : paul (at) *nospam* paulglover.net.invalid
Groupes : comp.lang.cDate : 26. Apr 2024, 23:41:36
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v0haj0$3ujjm$2@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : tin/2.6.3-20231224 ("Banff") (FreeBSD/14.0-RELEASE (amd64))
Kaz Kylheku <
433-929-6894@kylheku.com> wrote:
I have a simpler approach: commits which introduced commented-out
code, whether with #if 0, or any other means, shall not be merged.
I don't perpetrate that in my open source projects, and "-1" such
submissions at work.
When someone wants to remove code, I encourage them to actually
delete it. The comment about why it was deleted goes into the
commit log.
Yes!! Every time a dev checks in dead code, $DEITY kills a small furry
creature out of spite.
Maybe it was appropriate 40 years ago before we had version control
systems, but we do now, and code deleted that needed to stay can easily
be brought back from the void. (I just had to do that in my day job, an
"unused" line which the IDE flagged actually was important and removing
it caused a runtime error. It was a 5 second fix when I could just pull
up the change details and pull the line back in.)
-- Paul.