Re: RFC: multiline comments

2000-08-05 Thread Uri Guttman
please move this thread to the mlc list. thanx, uri -- Uri Guttman - [EMAIL PROTECTED] -- http://www.sysarch.com SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting The Perl Books Page --- http://www.sysarch.com/cgi-bin/perl_books The Best

Re: RFC: multiline comments

2000-08-05 Thread Michael Mathews
Jarkko Hietaniemi said > What's wrong with stealing from C/C++/Java instead > of trying to invent our own? > > In other words, what's wrong with /* ... */? For one thing this would break (looking for zero or many slashes, x, y and zero to many zs): if (/\/*xyz*/) { ... }; Perl has gotten its

Re: RFC: multiline comments

2000-08-05 Thread Mike Pastore
Russ Allbery wrote: > > Jarkko Hietaniemi <[EMAIL PROTECTED]> writes: > > > I also confess to liking // more for till-end-of-line comment marker > > than #, the hash looks so messy to my eye...of course, // already has > > a meaning... > > I'm the other way around. > > This may depend a lot o

Re: RFC: multiline comments

2000-08-05 Thread Russ Allbery
Jarkko Hietaniemi <[EMAIL PROTECTED]> writes: > I also confess to liking // more for till-end-of-line comment marker > than #, the hash looks so messy to my eye...of course, // already has > a meaning... I'm the other way around. This may depend a lot on whether one comes from a shell scripting

Re: RFC: multiline comments

2000-08-05 Thread Jarkko Hietaniemi
I also confess to liking // more for till-end-of-line comment marker than #, the hash looks so messy to my eye...of course, // already has a meaning... -- $jhi++; # http://www.iki.fi/jhi/ # There is this special biologist word we use for 'stable'. # It is 'dead'. -- Jack Cohen

Re: RFC: multiline comments

2000-08-05 Thread Jarkko Hietaniemi
I should read what has been said about the matter earlier...but lacking the time, I'll just shoot: What's wrong with stealing from C/C++/Java instead of trying to invent our own? In other words, what's wrong with /* ... */? -- $jhi++; # http://www.iki.fi/jhi/ #

Re: RFC: multiline comments

2000-08-05 Thread Edwin Wiles
Of all the variations that I've seen so far (I'm way behind on reading the list), the one I like the best is: qc{ multi line comment here } Second best, but still acceptable would be: #<# variations just don't seem "perlish" to me. Sorry! That's just a personal feeling. If you just have to g

Re: RFC: multiline comments

2000-08-03 Thread Martyn J. Pearce
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

Re: A Unicode fallacy [Was: Re: RFC: multiline comments]

2000-08-03 Thread Glenn Linderman
John Porter wrote: > Glenn Linderman wrote: > > > > Agreed, but neither should perl implement features which make it hard for the > > programmer to stick to that advice. > > That sounds reasonable, on first take, but actually I think that > goes against the grain of perl's philosophy, which is to

Re: A Unicode fallacy [Was: Re: RFC: multiline comments]

2000-08-03 Thread John Porter
Glenn Linderman wrote: > > Agreed, but neither should perl implement features which make it hard for the > programmer to stick to that advice. That sounds reasonable, on first take, but actually I think that goes against the grain of perl's philosophy, which is to let the programmer do what she

Re: A Unicode fallacy [Was: Re: RFC: multiline comments]

2000-08-03 Thread Glenn Linderman
John Porter wrote: > Glenn Linderman wrote: > > Stick with characters in the normal character set of the author of the > > script, except for forays into the language of the users of the script. > > Good advice for the programmer, perhaps; but it should not be perl's > job to enforce that discipl

Re: A Unicode fallacy [Was: Re: RFC: multiline comments]

2000-08-03 Thread John Porter
Glenn Linderman wrote: > Stick with characters in the normal character set of the author of the > script, except for forays into the language of the users of the script. Good advice for the programmer, perhaps; but it should not be perl's job to enforce that discipline. -- John Porter

A Unicode fallacy [Was: Re: RFC: multiline comments]

2000-08-03 Thread Glenn Linderman
The message below gives the context for this diatribe. A perl script is probably written in a particular language, probably for users of that language, possibly for users of a second language. Unless there are lots of I18N type features added into Perl to allow extracting all string constants fr

Re: RFC: multiline comments

2000-08-02 Thread Graham Barr
On Wed, Aug 02, 2000 at 03:00:04PM -0400, Michael Mathews wrote: > Ted Ashton wrote: > > The qc() > > proposal fits in well with the Perl "look-and-feel" and seems pretty > > comfortable to me. If there are concerns about obfuscatory potential, a > > use strict 'comments' could require that the q

Re: RFC: multiline comments

2000-08-02 Thread Tom Christiansen
>Tom Christiansen wrote: >> > comment <> >> Smack--the lexer cowers before you! >Well, hey, while we're daydreaming... :-) I suppose I should have written The lexer misses! You hit--More--the lexer cowers before you. --tom

Re: RFC: multiline comments

2000-08-02 Thread John Porter
Tom Christiansen wrote: > > comment < > Smack--the lexer cowers before you! Well, hey, while we're daydreaming... :-) -- John Porter

Re: RFC: multiline comments

2000-08-02 Thread Tom Christiansen
>Proposal: here-docs specified with regexes, and no special >meaning for newlines. > comment <

Re: RFC: multiline comments

2000-08-02 Thread John Porter
Tom Christiansen wrote: > > I still like this solution prototype: > > sub comment($) { } > > comment <<"END OF FIRST COMMENT"; > asdf > asdf > asdf > asdf > asdf > END OF FIRST COMMENT So do I. Actually, here-docs can be a bit unwieldy, what with the requirement for the e

Re: RFC: multiline comments

2000-08-02 Thread Tom Christiansen
>This seems like an acceptable variation on what has been suggested so far. I >deally one would be able to safely block comment any large section of a Perl >6 script and not worry about any other block comments within (the outermost >block comment takes precedence). I still like this solution pro

Re: RFC: multiline comments

2000-08-02 Thread John Porter
Michael Mathews wrote: > > So this should work in Perl 6 > > code here; > #< > # this is a single line comment > $foo = $a + $b #< here's an in-line comment ># + $c * $d; > ># > more code here; If starting in column 1 is going to be magic, you may as well make the magic char #, so: #<

Re: RFC: multiline comments

2000-08-02 Thread John Porter
Glenn Linderman wrote: > > > > qc( Here's a quick comment which actually contains > > qc( another comment ) > > within it > > ); > > This type of comment will not comment out arbitrary text. > In particular, it might have problems with text containing > mismatched (){}<>. This is alre

Re: RFC: multiline comments

2000-08-02 Thread Michael Mathews
Ted Ashton wrote > > 2) Also this proposition fails in one of my goals, which was to allow > > arbitrary nesting of multiline comments. I believe this would be true for > > any function based solution. > > Negative. If you use paired delimiters you're ok. > > qc( Here's a quick comment which actu

Re: RFC: multiline comments

2000-08-02 Thread Michael Mathews
Glenn Linderman wrote: >$foo = $a + $b #< can this be an in-line comment? ># + $c * $d; > > Note that with this scheme it would be possible to allow in-line comments to be > multi-line comments, or possible to prevent that. I'd vote in favor of keeping > in-line comments on a single line. >

Re: RFC: multiline comments

2000-08-02 Thread Glenn Linderman
Ted Ashton wrote: > > 2) Also this proposition fails in one of my goals, which was to allow > > arbitrary nesting of multiline comments. I believe this would be true for > > any function based solution. > > Negative. If you use paired delimiters you're ok. > > qc( Here's a quick comment which ac

Re: RFC: multiline comments

2000-08-02 Thread Ted Ashton
Thus it was written in the epistle of Michael Mathews, > Ted Ashton wrote: > > The qc() > > proposal fits in well with the Perl "look-and-feel" and seems pretty > > comfortable to me. If there are concerns about obfuscatory potential, a > > use strict 'comments' could require that the qc( opening

Re: RFC: multiline comments

2000-08-02 Thread Glenn Linderman
Edwin Wiles wrote: > On the other hand, the stated desire for this is for commenting out > blocks of code. That might be more achievable with (I forget the right > name for this) 'compile time directives' such as "#if", "#endif". We'd > have to use a different opening syntax, since # is already

Re: RFC: multiline comments

2000-08-02 Thread John Porter
Michael Mathews wrote: > > 2) Also this proposition fails in one of my goals, which was to allow > arbitrary nesting of multiline comments. I believe this would be true for > any function based solution. > > For example, this should be okay but I don't see how it could: > > 1qc/* > 2

Re: RFC: multiline comments

2000-08-02 Thread Michael Mathews
Ted Ashton wrote: > The qc() > proposal fits in well with the Perl "look-and-feel" and seems pretty > comfortable to me. If there are concerns about obfuscatory potential, a > use strict 'comments' could require that the qc( opening start in column one. > Further, if qc were flexible about delimi

Re: RFC: multiline comments

2000-08-02 Thread John Porter
Ted Ashton wrote: > The qc() > proposal fits in well with the Perl "look-and-feel" and seems pretty > comfortable to me. If there are concerns about obfuscatory potential, a > use strict 'comments' could require that the qc( opening start in column one. I think qc() should be allowed to look l

Re: RFC: multiline comments

2000-08-02 Thread Ted Ashton
Thus it was written in the epistle of Michael Mathews, > If don't think multiline comments are worthwhile, then we should leave it > out. But I don't see the point in arguing that a functionality should be > kept out of the language because it can be added to the Text-Editing > software!! Agreed

Re: RFC: multiline comments

2000-08-02 Thread Michael Mathews
If don't think multiline comments are worthwhile, then we should leave it out. But I don't see the point in arguing that a functionality should be kept out of the language because it can be added to the Text-Editing software!! I am not really arguing about single-line comments anyway. We all kno

Re: RFC: multiline comments

2000-08-02 Thread Tom Christiansen
>Johan Vromans writes: >>Well, my editor has no problems to put #'s in front of a section of >>lines, nor to remove them. >Not every editor does this. Perl is supposed to be flexible and make things >easy. It is not more flexible nor easier to require a programmer to use a >certain type of editor

Re: RFC: multiline comments

2000-08-02 Thread Michael Mathews
Johan Vromans writes: >Well, my editor has no problems to put #'s in front of a section of >lines, nor to remove them. Not every editor does this. Perl is supposed to be flexible and make things easy. It is not more flexible nor easier to require a programmer to use a certain type of editor. I d

Re: RFC: multiline comments

2000-08-02 Thread Johan Vromans
"Michael Mathews" <[EMAIL PROTECTED]> writes: > Unlike many programming languages Perl does not currently implement true > multiline comments. This can be confusing/tedious to programmers. I fail to see this. What is confusing? As has been pointed out earlier, with multi-line comments like in C

Re: RFC: multiline comments

2000-08-02 Thread Edwin Wiles
John Porter wrote: > > Michael Mathews wrote: > > Using a two-character syntax to start and end a multiline comment seems to > > be a good way to satisfy both the desired similarity to "#" and the desired > > uniqueness to avoid collision with real single-line quotes. I would suggest > > a (# man

Re: RFC: multiline comments

2000-08-01 Thread Tim Jenness
On Tue, 1 Aug 2000, John Barnette wrote: > Michael Fowler wrote: > > On Tue, Aug 01, 2000 at 05:28:08PM -0400, Michael Mathews wrote: > > > Unlike many programming languages Perl does not currently implement true > > > multiline comments. This can be confusing/tedious to programmers. This could >

Re: RFC: multiline comments

2000-08-01 Thread John Barnette
Michael Fowler wrote: > I'm not sure exactly what you consider to be a "true multiline comment", but > Perl definitely has them by my definition. > > =pod > > Hi, this is a multiline comment. > > =cut ...and there are a lot WORSE ways to do this in current Perl: sub multiline-comment {} mul

Re: RFC: multiline comments

2000-08-01 Thread Michael Mathews
al Message - From: "Michael Fowler" <[EMAIL PROTECTED]> Sent: Tuesday, August 01, 2000 6:15 PM Subject: Re: RFC: multiline comments On Tue, Aug 01, 2000 at 05:28:08PM -0400, Michael Mathews wrote: > Unlike many programming languages Perl does not currently implement true >

Re: RFC: multiline comments

2000-08-01 Thread John Barnette
Michael Fowler wrote: > On Tue, Aug 01, 2000 at 05:28:08PM -0400, Michael Mathews wrote: > > Unlike many programming languages Perl does not currently implement true > > multiline comments. This can be confusing/tedious to programmers. This could > > be solved by adding a syntax to Perl 6 that wou

Re: RFC: multiline comments

2000-08-01 Thread Michael Fowler
On Tue, Aug 01, 2000 at 05:28:08PM -0400, Michael Mathews wrote: > Unlike many programming languages Perl does not currently implement true > multiline comments. This can be confusing/tedious to programmers. This could > be solved by adding a syntax to Perl 6 that would allow for true multiline >

Re: RFC: multiline comments

2000-08-01 Thread Michael Mathews
John Porter wrote: > qc( here's some text which will evaluate to "silent undef". ); > Could be very much like qw() ... Cool, I like the perlishness of your proposal. But not so sure about "qc". Would this be a function? Why would it be a function? What would qc imply, "quote comment"? This is co

Re: RFC: multiline comments

2000-08-01 Thread John Porter
Michael Mathews wrote: > > =head2 Proposal > > Using a two-character syntax to start and end a multiline comment seems to > be a good way to satisfy both the desired similarity to "#" and the desired > uniqueness to avoid collision with real single-line quotes. I would suggest > a (# many lines

RFC: multiline comments

2000-08-01 Thread Michael Mathews
Okay, so no one seemed to be offended at my original post/suggestion -- must mean I should try to take it a little further :) Here's the RFC in POD even. --Michael =head1 TITLE Multiline Comments for Perl. =head1 VERSION Maintainer: Michael J. Mathews <[EMAIL PROTECTED]> Date: 01 Aug 20