Re: Multiline comments in Perl6

2008-01-03 Thread Larry Wall
On Thu, Jan 03, 2008 at 08:55:24PM +0200, Gabor Szabo wrote: : On Jan 3, 2008 6:36 PM, Larry Wall <[EMAIL PROTECTED]> wrote: : > On Wed, Jan 02, 2008 at 11:28:54AM -0800, Jonathan Lang wrote: : > : Paul Hodges wrote: : > : > http://perl6.org/doc/design/syn/S02.html still says: : > : > "Intra-line

Re: Multiline comments in Perl6

2008-01-03 Thread Paul Hodges
--- Jonathan Lang <[EMAIL PROTECTED]> wrote: > Paul Hodges wrote: > > http://perl6.org/doc/design/syn/S02.html still says: > > "Intra-line comments will not be supported in standard Perl" > > This is wrong, since S02 also defines intra-line comments, under > "Whitespace and Comments". It calls

Re: Multiline comments in Perl6

2008-01-03 Thread Gabor Szabo
On Jan 3, 2008 6:36 PM, Larry Wall <[EMAIL PROTECTED]> wrote: > On Wed, Jan 02, 2008 at 11:28:54AM -0800, Jonathan Lang wrote: > : Paul Hodges wrote: > : > http://perl6.org/doc/design/syn/S02.html still says: > : > "Intra-line comments will not be supported in standard Perl" > Note that the docum

Re: Multiline comments in Perl6

2008-01-03 Thread Larry Wall
On Wed, Jan 02, 2008 at 11:28:54AM -0800, Jonathan Lang wrote: : Paul Hodges wrote: : > http://perl6.org/doc/design/syn/S02.html still says: : > "Intra-line comments will not be supported in standard Perl" : : This is wrong, since S02 also defines intra-line comments, under : "Whitespace and Comm

Re: Multiline comments in Perl6

2008-01-02 Thread Jonathan Lang
Jonathan Lang wrote: > How about '~#', meaning something along the lines of "string-like > comment"? The idea is that the syntax that follows this would conform > closely to that of string literals (i.e., quotes). We might even > consider loosening the restrictions on delimiter characters, allowi

Re: Multiline comments in Perl6

2008-01-02 Thread Jonathan Lang
I've been putting a fair amount of thought into this. Here's what I've come up with: Perl 6 has several instances where whitespace is required or forbidden in order to better facilitate "Do What I Mean" programming: for instance, by having the presence or absence of whitespace before curly braces

Re: Multiline comments in Perl6

2008-01-02 Thread Jonathan Lang
Paul Hodges wrote: > http://perl6.org/doc/design/syn/S02.html still says: > "Intra-line comments will not be supported in standard Perl" This is wrong, since S02 also defines intra-line comments, under "Whitespace and Comments". It calls them 'embedded comments'. You don't need a 'use' statemen

Re: Multiline comments in Perl6

2008-01-02 Thread Paul Hodges
I love this list. I wish I had more of value to contribute. =o] But for those of you who don't want to read a long blather, this is mostly opinion, hopefully sans soapbox. Feel free to skip to the end. > What's with the sudden influx of people swooping in at the > last minute and attacking design

Re: Multiline comments in Perl6

2007-12-30 Thread Shane Calimlim
On Dec 30, 2007 8:10 AM, Jonathan Lang <[EMAIL PROTECTED]> wrote: > Let's say that the programmer in question wants to comment out all but > the third line; so he prefixes everything else with '#': > > #if ($test) > #{ >.say; > #} else { > # .doit; > #} > > What the writer _wants_ this t

Re: Multiline comments in Perl6

2007-12-30 Thread Christian Mueller
>> Thanks for the reply - can you please what is the problem with having it in the beginning of the line? > > Short answer: the compiler has no way of knowing whether the > programmer wants an embedded comment or a line comment; so instead of guessing, it requires the programmer to disambiguate. >

Re: Multiline comments in Perl6

2007-12-30 Thread Jonathan Lang
Offer Kaye wrote: > #( commenting out a large code section, yey for Perl6 multi-line comments... >if ($foo) { > print "...or not :(\n" >} > ) # this should have been the end of the embedded comment ...and since it wasn't, you probably should have chosen other brackets such as: #[

Re: Multiline comments in Perl6

2007-12-30 Thread Mark J. Reed
Whitespace is significant in many places. Even in some of the corners of Perl 5. Perl 6 has a different set of rules, and it will take some getting used to, but the rules are designed to let you do things as naturally as possible.This, for instance, works fine: my @values = # (1,2,3) # old

Re: Multiline comments in Perl6

2007-12-30 Thread Offer Kaye
On Dec 30, 2007 6:10 PM, Jonathan Lang wrote: > > Short answer: the compiler has no way of knowing whether the > programmer wants an embedded comment or a line comment; so instead of > guessing, it requires the programmer to disambiguate. > [...snip...] > > # if ($test) > # { > .say; >

Re: Multiline comments in Perl6

2007-12-30 Thread Jonathan Lang
Amir E. Aharoni wrote: > On 30/12/2007, Jonathan Lang <[EMAIL PROTECTED]> wrote: > > The only wart > > is that '#( ... )' cannot begin at the very start of a line; but it's > > easy enough to get around that restriction - say, with some leading > > whitespace. > > Thanks for the reply - can you ple

Re: Multiline comments in Perl6

2007-12-30 Thread Amir E. Aharoni
On 30/12/2007, Jonathan Lang <[EMAIL PROTECTED]> wrote: > The only wart > is that '#( ... )' cannot begin at the very start of a line; but it's > easy enough to get around that restriction - say, with some leading > whitespace. Thanks for the reply - can you please what is the problem with having

Re: Multiline comments in Perl6

2007-12-30 Thread Jonathan Lang
Christian Mueller wrote: > i don't know the actually state in the discussion about multiline > comments, but i would propose an idea.. a combination of POD's = and the > traditional route char... Perl 6 already has a robust system for multiline and embedded comments, as described in S02 under "Whi