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

Fw: RFC: multiline comments

From:
Michael Mathews
Date:
August 3, 2000 11:23
Subject:
Fw: RFC: multiline comments
Message ID:
027e01bffd78$04ee4450$af0c0a0a@ny.oxygen.com
[forwarded from the general language list, posted by Martyn J. Pearce
<fluffy@engineer.com>]

> John Porter writes:
> |   qc( here's some text which will evaluate to "silent undef". );
> |
> | Could be very much like qw(), in the sense that
> |
> |   % perl -w
> |   qc{
> |       once upon a time
> |       # now for the clincher
> |       happily ever after.
> |   };
> |   Possible attempt to put comments in qc() at - line 5.
> |
> | One could use qw() or q() for this right now; but those result in
> | a value, which under some circumstances causes a warning issuance.
>
> Disclaimer:  am not in any way agreeing that there is a need for
> multiline comments : ---------------
>
> The above has one particular problem that I can see: it relies upon the
> correct nesting of the delimiter.  C style */ end delimiters are rarely
> if ever seen in the code, so work reasonably well (although I still see
> people falling over nested comments); the above, with a likely
> single-char delimiter, be it ) } or even !, would be all too easy to
> fall foul of, and spotting the error would be tedious; esp. when the
> false ending was hidden in, say, a string.
>
> --
> See, the stars are shining bright
> Everything's all right tonight
> -- (Martin L. Gore, Never Let Me Down Again)





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About