On Wed, 18 Aug 1999, Ramon van Handel wrote:

> "Timothy J. Massey" wrote:
> > Same here.  Trying to comment out a section of well-documented code in an
> > environment that doesn't support nested comments gets really, really old...
> 
> My policy is this:
> 
> 1.  Always use C comments.  Perferably like this:
[snip]
> 2.  When I need to comment out large pieces of code+comments, I enclose
> the
>     code between #if 0 and #endif.  VERY effective, and a lot less ugly
>     than // comments.
> 
> I do use // comments while debugging because it's kinda easy to comment
> out one line like that, but I try to avoid them in code I distribute.
> 
> Of course, if everybody here is for C++ comments I can adapt :)

FWIW I prefer C++ comments for short one-liners.  Longer ones should
be C-style.  Commenting out a large block of code I'd use "#if 0", or
sometimes "#if USE_THE_OLD_BROKEN_METHOD" or something descriptive
like that.

Chris
-- 
Chris Emerson, obsessed Cambridge juggler
E-mail: [EMAIL PROTECTED]
Web page: http://www.chiark.greenend.org.uk/~cemerson/

Reply via email to