Re: RFC: multiline comments
[email protected] ("Michael Mathews") Thu, 3 Aug 2000 15:06:29 -0400
| Newsgroups | perl.perl6.language.mlc |
|---|---|
| Organization | Oxygen Media, Inc. |
| Message-ID | <[email protected]> |
Glenn Linderman said: > And while the existing q.() operators are typically used to surround > fairly short blocks of text, with controlled content, the desire to > comment out blocks of existing code with a multi-line comment facility > has different goals, that are hard to meet with a single character > delimiter, especially a paired one that results in scanning of the > internal content for consistent usage of the delimiter. Yes! this exactly the problem that I think *any* function-based proposal will suffer, namely: function arguments have single-character delimiters, and that single-character must not appear unescaped within the argument itself. Therefore the idea of using a comment function fails in the very important goal of making it easy to comment large chunks of arbitrary perl code. Unless anyone can prove otherwise I would say we should consider that a dead issue. > A multi-character delimiter seems required to me to make it easy to > identify a delimiter which can be safely used. One very Perl-ish > technique for multi-character delimiters is > <<END_OF_TEXT > > stuff > > > END_OF_TEXT > > Together with the very Perl-ish technique for comments (the '#' > character) this leads very obviously to: > > #<<END_OF_TEXT > > comment stuff > > END_OF_TEXT > I like this a lot. Any idea how this could work inline? or would you prefer not to have fully inline comments? --Michael