develooper Front page | perl.perl6.language.mlc | Postings from August 2000

Re: Inline comments. WAS:Re: Recording what we decided *not* to do, and why

Thread Previous | Thread Next
Glenn Linderman
August 7, 2000 15:54
Re: Inline comments. WAS:Re: Recording what we decided *not* to do, and why
Message ID:
Michael Mathews wrote:

> Glenn Linderman said:
> > The "#<<token" is big enough it won't be found by accident, but too big
> for
> > in-line comments.
> Agreed.
> > The #< or #* is small enough for in-line comments, but
> > could have been used in single line comment days, so it better not
> > accidentally comment out a large block of code (there may be a ># or *#
> > somewhere later, so you'd get no warning).
> Oh!! I see what you mean now but I am a little leery about having now 3
> different ways of commenting. Also I don't see why anyone couldn't use the
> Linderman Style Comments as a block. It has the  feature of distinct opening
> and closing delimiters and, and unlike qc's braces I can't think of any
> example where #* or *# would appear unquoted in regular code (no more likely
> than finding */ in Java or C++ code). Why not use it as a more general
> comment-with-explicit-opening-and-closing?

I agree #* and *# are unlikely to appear in perl code today, but of the two *#
is more likely:

   $x = $y *#this is the multiplicand
           $z;#this is the multiplier

> Still there is the problem of what to do about single line comments that
> start with "#*", but I would suggest that any unmatched #* be treated as a
> single-line comment. Maybe give a warning under Strict.

This requires [p]rescanning lots of source to determine if it is matched, or

There  are two kinds of people, those
who finish  what they start,  and  so
on...                 -- Robert Byrne

Why pay for something you could get for free?
NetZero provides FREE Internet Access and Email

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About