Path: csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: Which code style do you prefer the most?
Date: Sun, 02 Mar 2025 00:49:39 -0800
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <86tt8bx1ek.fsf@linuxsc.com>
References: <20250225104754.267@kylheku.com> <874j0g2a8u.fsf@onesoftnet.eu.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Sun, 02 Mar 2025 09:49:45 +0100 (CET)
Injection-Info: dont-email.me; posting-host="3262fa73ab11de5fd8cc37f0606a7eed"; logging-data="746144"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/12/pgizqpz7Np9XsizRnqynJEfDnVaK4="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:t7wQfpCO3Z1zlHL4J8d/Q7N0JFc= sha1:MmsQF7eIscCmRd+92t1CRKtjkiM=
Xref: csiph.com comp.lang.c:390631
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.