Aaron said:
> Jonathan wrote:
>
> > I encountered this problem (actually a related problem,
> > But it's an example of why poplog needs a bug-tracker,
> ISL used to have a process, and a form (of which a relic remains in
> HELP BUGFORM).
Yes. That was long ago and far away.
> Since Poplog became available free of charge in 1999 very few bugs have
> emerged.
True.
> > How many times to you see big comments enclosed in a box
> > of asterisks, to make them stand out? In C++ the #ifdef
> > mechanism is useful for hiding blocks of code, and is
> > better than using comment brackets for that purpose;
> > there is a similar mechanism in pop11.
>
> That is an ingenious suggestion. I.e. in addition to the 'official'
> comment styles, pop11 supports comments like this using its conditional
> compilation syntax:
>
> #_IF false
>
> This is a comment and will not cause syntactic errors
> even if it includes
> '#_ENDIF'
>
> because the string quotes successfully hide the closing
> bracket, unlike '*/' in a normal pop11 comment.
>
> #_ENDIF
>
> What's more, those brackets can even be nested.
>
> Hmm...
I don't claim credit for the idea. I *do* claim that nowadays,
except when I'm feeling lazy, I comment comments using the
eol syntax (// ... or ;... or ;;;... or #...) and I comment *out*
chunks of code using
#if 0
commented out code
#endif
(in C or C++) etc.
It's actually *quicker* to remove the "comment brackets":
#if 1
this is not commented out
#endif
Let the compiler do the work!
I also find
#if DEBUG
...
#else
...
#endif
and all its very obvious variants quite useful ... and there is little
harm in leaving them in libraries: no runtime overhead.
Jonathan
|