Damian Conway wrote:
I'm not enamoured of the .# I must confess. Nor of the #. either. I wonder
whether we need the dot at all. Or, indeed, the full power of arbitrary
delimiters after the octothorpe.
Agreed.
What if we restricted the delimiters to the five types of balanced brackets?
On Tue, Apr 11, 2006 at 12:26:13PM +1200, Sam Vilain wrote:
: This does mean that if you comment out blocks with s/^/#/, you mess up on:
:
: #sub foo
: #{
: # if foo { }
: #}
Well, actually, that still works. To be certain though, you could always
use s/^/##/ or s/^/# /. Even better is:
On 4/10/06 8:38 PM, Larry Wall wrote:
Even better is:
=begin UNUSED
sub foo
{
if foo { }
}
=end UNUSED
And I don't really care if that's not what people are used to.
The whole point of Perl 6 is to change How Things Work.
Do you care that it's harder to
Larry Wall wrote:
On Tue, Apr 11, 2006 at 12:26:13PM +1200, Sam Vilain wrote:
: This does mean that if you comment out blocks with s/^/#/, you mess up on:
:
: #sub foo
: #{
: # if foo { }
: #}
Well, actually, that still works.
Oh, true :-)
But this fragment dies:
#sub foo
#{
# bar
On Tue, Apr 11, 2006 at 12:54:50PM +1200, Sam Vilain wrote:
: Larry Wall wrote:
:
: On Tue, Apr 11, 2006 at 12:26:13PM +1200, Sam Vilain wrote:
: : This does mean that if you comment out blocks with s/^/#/, you mess up on:
: :
: : #sub foo
: : #{
: : # if foo { }
: : #}
:
: Well, actually,
On 4/10/06 9:11 PM, Larry Wall wrote:
I think commenting out code with # is sufficiently antisocial that
you should probably do it with .
What's antisocial about it? What's the alternative for quickly commenting
out a few lines? Braced #[ ... ]# pairs are not as easy to mindlessly
Larry Wall wrote:
: But this fragment dies:
:
: #sub foo
: #{
: # bar { } unless baz
: #}
I don't see how that's different at all from the first example.
“#sub foo” is parsed as a comment token
“#{
# bar { }” is the next comment token
then we get “unless baz”
Unless you are balancing
Damian Conway wrote:
Larry wrote:
I really prefer the form where .#() looks like a no-op method
call, and can provide the visual dot for a postfix extender. It
also is somewhat less likely to happen by accident the #., I
think. And I think the front-end shape of .# is more
recognizable
On Tue, Apr 11, 2006 at 01:21:32PM +1200, Sam Vilain wrote:
: Larry Wall wrote:
:
: : But this fragment dies:
: :
: : #sub foo
: : #{
: : # bar { } unless baz
: : #}
: I don't see how that's different at all from the first example.
:
:
:
: “#sub foo” is parsed as a comment token
: “#{
Damian Conway wrote:
I'm not enamoured of the .# I must confess. Nor of the #. either. I
wonder whether we need the dot at all. Or, indeed, the full power of
arbitrary delimiters after the octothorpe.
What if we restricted the delimiters to the five types of balanced
brackets? And then
Larry wrote:
I really prefer the form where .#() looks like a no-op method call,
and can provide the visual dot for a postfix extender. It also is
somewhat less likely to happen by accident the #., I think. And I
think the front-end shape of .# is more recognizable as different
from #, while
At 08:38 -0400 8/4/06, John Siracusa wrote:
On 4/8/06 6:29 AM, Damian Conway wrote:
I'm not enamoured of the .# I must confess. Nor of the #. either.
Thank goodness...I was beginning to think it was only me!
For the record, I agree with both of you, and that your proposed
alternatives are
Okay, after attempting and failing to take a nap, I think I know what's
bugging me about long dot. It seems just a little too specific.
So here's another proposal. We've been saying forever that we don't
need start/stop comments. But maybe, just maybe, if they also cure the
delayed postfix
Delimiter-terminated quotes. Really nice idea.
I'd put the dot inside the comment: #.x, with x being an optional
quote delimiter (excluding dots). If a delimiter is included, the
comment is terminated by the matching quote delimiter; if absent, the
comment is terminated by the next dot.
On Fri, Apr 07, 2006 at 06:31:44PM -0700, Jonathan Lang wrote:
Delimiter-terminated quotes. Really nice idea.
I'd put the dot inside the comment: #.x, with x being an optional
quote delimiter (excluding dots). If a delimiter is included, the
comment is terminated by the matching quote
Patrick R. Michaud wrote:
But if one is going to go this route (and I'm not sure that we should),
then when the delimiter is absent have the comment terminate at
the first non-whitespace character.
...which makes #.\s good only for inserting whitespace where it
normally wouldn't belong. On
LW == Larry Wall [EMAIL PROTECTED] writes:
LW Okay, after attempting and failing to take a nap, I think I know
LW what's bugging me about long dot. It seems just a little too
LW specific.
does this mean you are at the dawning of your dot.age?
me ducks and runs
i couldn't resist! :)
On Fri, Apr 07, 2006 at 07:00:29PM -0700, Jonathan Lang wrote:
Patrick R. Michaud wrote:
Jonathan wrote:
If a delimiter is included, the
comment is terminated by the matching quote delimiter; if absent, the
comment is terminated by the next dot.
But if one is going to go this route
On Fri, Apr 07, 2006 at 06:31:44PM -0700, Jonathan Lang wrote:
: Delimiter-terminated quotes. Really nice idea.
:
: I'd put the dot inside the comment: #.x, with x being an optional
: quote delimiter (excluding dots). If a delimiter is included, the
: comment is terminated by the matching quote
Larry Wall wrote:
I really prefer the form where .#() looks like a no-op method call,
and can provide the visual dot for a postfix extender.
Although inline and multiline comments are very likely to be used in
situations where method calls simply aren't appropriate:
.#(+---+
| Hello! |
On Fri, Apr 07, 2006 at 08:11:04PM -0700, Jonathan Lang wrote:
: Larry Wall wrote:
: I really prefer the form where .#() looks like a no-op method call,
: and can provide the visual dot for a postfix extender.
:
: Although inline and multiline comments are very likely to be used in
: situations
Larry Wall wrote:
It's only a problem when some tries to write
.=#( ... :-)
[tries to grok the meaning of $foo.=#(Hello, World!)]
[fails]
: All true. But it avoids the headache of figuring out whether ..# is
: supposed to parse as a double-dot followed by a line-gobbling comment
: or
22 matches
Mail list logo