[antlr-interest] Re: nested comments

Jim Idle jimi at temporal-wave.com
Fri Jul 8 16:04:58 PDT 2005


> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Martin Probst
> 
> Hi,
> 
> > the right things to do is NOT to comment /* */ the code
> > but remove it with: #if 0 #endif, which can nest!
> 
> I heavily doubt that - the preprocessor is evil anyways, and also it
> might get really hard to read (maybe depending on your IDE, I haven't
> used one yet that highlighted such sections as comments). For the sake
> of readability you should probably use //, as that can nest too
> (although it's a pain if you don't have a proper IDE).

I highly doubt that! ;-) What you should actually do is use source code
control, delete it altogether and track the change and comment why you
deleted it - and not clutter the code with junk code that is potentially
confusing.

Jim


More information about the antlr-interest mailing list