Sujet : Re: Which code style do you prefer the most?
De : tr.17687 (at) *nospam* z991.linuxsc.com (Tim Rentsch)
Groupes : comp.lang.cDate : 02. Mar 2025, 09:49:39
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <86tt8bx1ek.fsf@linuxsc.com>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
scott@slp53.sl.home (Scott Lurndal) writes:
[using // instead of /* ... */ to comment out lines of code]
>
I disagree with this. A line of code should never be commented
out; simply removed if not necessary.
During development it can be useful to comment out one or
more lines of code, but leave the commented lines in the
source file. The point is we don't always know what is
necessary and what isn't. What matters when code is
finished and ready to be shipped is not the same as what
matters when code is in the process of being developed.
That distinction also applies to other things besides
whether to remove certain lines of code or just comment
them out.