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
--- 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
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
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
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
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
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
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
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
>> 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.
>
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:
#[
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
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;
>
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
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
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
It was just kind of a pain because you
had to put a "=cut" after the "=end", and because you had to put
paragraph spaces between everything. We're getting rid of both of
those restrictions.
Excellent! That's what was really bugging me. I'm really glad that is
changing :)
Thanks,
Alfie
Alfie John skribis 2005-10-12 15:28 (+1000):
> Does Perl6 support multiline comments?
All incarnations of Perl have allowed us to begin multiple subsequent
lines with the comment glyph '#'. I am sure Perl 6 will not break this
tradition.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http:
On 10/12/05, Alfie John <[EMAIL PROTECTED]> wrote:
> On 12/10/2005, at 3:33 PM, Luke Palmer wrote:
> > =begin comment
> > =end comment
>
> But does that then break my lovely formatted pod like it does in Perl5?
Try this:
% cat > dosomething.pl
=head1 TITLE
Thingy - do something
=head1 DESCRIPTI
On 12/10/2005, at 4:18 PM, Mark A. Biggar wrote:
Alfie John wrote:
Hi (),
This is probably a stupid question, but I can't find anything
from google:
Does Perl6 support multiline comments?
Briefly, No and kind of.
Standard Perl 6 comments are just like those in Perl 5. A '#'
starts
Alfie John wrote:
Hi (),
This is probably a stupid question, but I can't find anything from google:
Does Perl6 support multiline comments?
Briefly, No and kind of.
Standard Perl 6 comments are just like those in Perl 5. A '#' starts a
comment that is terminated by the end of line. But, bo
On 12/10/2005, at 3:33 PM, Luke Palmer wrote:
On 10/11/05, Alfie John <[EMAIL PROTECTED]> wrote:
Does Perl6 support multiline comments?
Yes, in the form of pod blocks.
=begin comment
=end comment
They nest, too.
Luke
But does that then break my lovely formatted pod like it does in Pe
On 10/11/05, Alfie John <[EMAIL PROTECTED]> wrote:
> Does Perl6 support multiline comments?
Yes, in the form of pod blocks.
=begin comment
=end comment
They nest, too.
Luke
>Tom Christiansen wrote:
>> #if 0
>> ...
>> #endif
>Ahem, has somebody already mentioned -P (perldoc perlrun)?
>If you want 'em, you already got 'em!
I'm in the choir, preacher! IWTFM. :-)/3
--tom
Tom Christiansen wrote:
> #if 0
> ...
> #endif
Ahem, has somebody already mentioned -P (perldoc perlrun)?
If you want 'em, you already got 'em!
--
[EMAIL PROTECTED]
:[EMAIL PROTECTED]]
Sent: Wednesday, August 02, 2000 4:58 PM
To: Michael Mathews
Cc: [EMAIL PROTECTED]
Subject: Re: multiline comments
>The way I see it Santa (aka Larry) has asked for our wish list. This is not
>the time to dwell on all the ways we can make due with our old toys.
I still
>The way I see it Santa (aka Larry) has asked for our wish list. This is not
>the time to dwell on all the ways we can make due with our old toys.
I still think saying :10,20s/^/##XXX## / is the cleanest and most
visually apparent block comment.
>PS I'm all for a new list. How do I get one?
I s
quot;Tom Christiansen" <[EMAIL PROTECTED]>
To: "Michael Mathews" <[EMAIL PROTECTED]>
Cc: "Nick Ing-Simmons" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, August 02, 2000 5:33 PM
Subject: Re: multiline comments
>
Michael Mathews wrote:
>
> > if (0) {
> > }
>
> 1) what if the block contains syntax errors?
> 2) what if the bloack contains unmatched braces?
> 3) this is not easier to type or remember than the currently available
> workarounds.
TIMTOWTDI.
--
John Porter
>> What is wrong with
>>
>> if (0) {
>>
>> }
>1) what if the block contains syntax errors?
Then the compiler carefully and courteously notifies you of such.
>2) what if the bloack contains unmatched braces?
See above.
>3) this is not easier to type or remember than the currently available
>
>What is wrong with
> if (0) {
> }
>(and of course teaching op builder not to build them in this case).
Funny, I was going to mention that I always use
#if 0
...
#endif
in C for nesting, block comments. Which is rare anyway, rarer perhaps
than this discussion would seem to mer
> What is wrong with
>
> if (0) {
>
> }
1) what if the block contains syntax errors?
2) what if the bloack contains unmatched braces?
3) this is not easier to type or remember than the currently available
workarounds.
Buddha Buck <[EMAIL PROTECTED]> writes:
>
>The one concern I would raise about this is that a common use of multi-line
>comments is to dyke out code.
What is wrong with
if (0) {
}
(and of course teaching op builder not to build them in this case).
--
Nick Ing-Simmons
Peter Scott wrote:
> At 02:53 PM 8/2/00 -0400, John Porter wrote:
> >Perhaps a better way would be a change in the semantics of scalar
> >literals in void context, to be silently ignored.
>
> No! It's a major typo/bug-catcher.
Strange, my experience does not confirm that one whit.
--
John Por
At 02:53 PM 8/2/00 -0400, John Porter wrote:
>Perhaps a better way would be a change in the semantics of scalar
>literals in void context, to be silently ignored.
No! It's a major typo/bug-catcher.
--
Peter Scott
Pacific Systems Design Technologies
Bart Lateur wrote:
>
> < This is comment!
> And more...
> END_OF_COMMENT
>
> Apart from the warning "Useless use of a constant in void context", it
> works.
Yes; but it was precisely that warning which I was intending to address.
Perhaps a better way would be a change in the semantics of scala
On Wed, 2 Aug 2000 12:51:10 -0400, John Porter wrote:
>> At the risk getting too exotic how about:
>>
>> #<> some
>> comments
>> EOC
>
>Just introduce a new function which is a bit bucket:
>
> # works in perl5.
> sub comment(@) { }
>
> comment q{ comments... };
"Function"? Who needs a functi
>It nice to be able to bounce on % in vi, too:
>=#{
>comment
>=#}
You easy to do this already:
=begin comment {
=end comment }
--tom
Michael Mathews wrote:
>
> At the risk getting too exotic how about:
>
> #< some
> comments
> EOC
Just introduce a new function which is a bit bucket:
# works in perl5.
sub comment(@) { }
comment q{ comments... };
comment <
Buddha Buck wrote:
>
> The one concern I would raise about this is that a common use of multi-line
> comments is to dyke out code. As such, it is handy to have the start and
> end markers different, and allow nesting.
It nice to be able to bounce on % in vi, too:
=#{
comment
=#}
--
John
Buddha Buck wrote:
> The one concern I would raise about this is that a common use of
multi-line
> comments is to dyke out code. As such, it is handy to have the start and
> end markers different, and allow nesting
I see your point. At the risk getting too exotic how about:
#<
At 10:55 AM 8/2/00 -0400, Michael Mathews wrote:
>I am prone to agree with this. I would be willing to promote the requirement
>of starting and ending multiline comments on their own line. Maybe something
>like this (this will not work in Perl 5):
>
>code to execute
>=#
>some
>comments to
>ignore
Tom Christiansen responded:
> One argument *against* intra-token-sequence multiline comments is that
they
> are harder to see, and thus render readers of the code more prone to
> misunderstand it. Is this worth really promoting?
> Settling on one
> pod target for multiline comments, and then
One argument *against* intra-token-sequence multiline comments is that they
are harder to see, and thus render readers of the code more prone to
misunderstand it. Is this worth really promoting?
The extant pod-based multiline comment solution does not suffer from this,
as it is quite easy to se
Tom Christiansen asked
> Do you really think
> =for comments
> or
> =begin comments
> ...
> =end comments
> are that bad? Sure, they have to be on statement boundaries, but
> that's more of a feature than a bug.
Hi Tom,
Do I think it is "that bad"? No. Of course not. I use it all the time. In
Plus you're still running à la pod mode, not à la code mode,
as mentioned on p630 of PP3. (I just looked to make sure multiline
comments were in the index. They are.)
--tom
>I apologize if this has already been gone over but I would really like to
>throw one out there: real Multi-line comments.
>This one has been bugging me for a long time. Any ideas?
>How about #/ lots of lines of code here, this is not backwards compatable,
>however /#
Do you really think
47 matches
Mail list logo