Author: larry
Date: Mon Apr 10 20:41:31 2006
New Revision: 8641
Modified:
doc/trunk/design/syn/S02.pod
Log:
Revised q<< <> >> to do bracket counting of long brackets internally.
Modified: doc/trunk/design/syn/S02.pod
===
On Mon, Apr 10, 2006 at 10:32:33PM -0400, Joe Gottman wrote:
:How does the "sub" keyword fit in here? Is there any difference between
: the lines
: return {say "Hello World";};
: and
: return sub {say "Hello World";};
: ?
Effectively, no, for these examples. In the second case y
Author: larry
Date: Mon Apr 10 19:34:44 2006
New Revision: 8638
Modified:
doc/trunk/design/syn/S02.pod
Log:
Force # on the left margin to be line-end comment regardless of brackets.
Modified: doc/trunk/design/syn/S02.pod
===
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 10, 2006 10:22 PM
> To: perl6-language@perl.org
> Subject: [svn:perl6-synopsis] r8637 - doc/trunk/design/syn
>
> Author: larry
> Date: Mon Apr 10 19:21:56 2006
> New Revision: 8637
>
> Modifie
Author: larry
Date: Mon Apr 10 19:21:56 2006
New Revision: 8637
Modified:
doc/trunk/design/syn/S04.pod
Log:
Bare block executes immediately; return of closure must be explicit.
Modified: doc/trunk/design/syn/S04.pod
hello perlisticers
(my first post)
i read in the perl6 book second edition something called
/Integer context/ and /Numeric context/
Ican understand the difference but since nowhere in the synopses i read
a word abou integer context im not
shore if these concept is thrown away. is it the case.
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 simpl
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 toke
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
> recognizab
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 b
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"
On Mon, Apr 10, 2006 at 08:46:02PM -0400, John Siracusa wrote:
: Do you care that it's harder to visually pick out the commented-out portions
: of a file at a glance using that syntax? I really don't want to give up
: s/^/#/ commenting. Double ##s seem like overkill to me. Then I have to use
: t
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, actua
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
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 hard
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:
=
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 Mon, Apr 10, 2006 at 14:25:35 -0700, Larry Wall wrote:
> : my $x = grep { ... } @list; # returns count
>
> I think that's already "whatever context". $x contains the resulting array.
> It's only if you later say +$x that you'll get the number of elems.
Just for grep or for any function?
On Sun, Apr 09, 2006 at 02:43:16PM +0300, Yuval Kogman wrote:
: Hi...
:
: I think that Perl 6 should have a "whatever" context, which is
: essentially:
:
: I want either array or scalar or whatever... You choose
:
: so that functions like grep can return an array in "whatever"
: context. T
Author: larry
Date: Mon Apr 10 13:22:51 2006
New Revision: 8631
Modified:
doc/trunk/design/syn/S02.pod
Log:
Clarifications suggested by Nick++ and Daniel++.
Also pilfered the q[[[ ... ]]] multibracket mechanism from pod.
Modified: doc/trunk/design/syn/S02.pod
On Mon, Apr 10, 2006 at 11:04:45AM -0700, [EMAIL PROTECTED] wrote:
> Embedded comments are supported as a variant on quoting syntax, introduced
> -by C<.#> and delimited by user-selected characters.
> +by C<#> plus any user-selected bracketing characters (including Unicode):
I don't think that a
> +insert a line break into a sequence of methods calls include:
s/methods/method/
> A consequence of the postfix rule is that (except when delimiting a
...
> +a quote or terminating a "long dot") a dot with whitespace in front
Too many a's.
> +you to insert optional whitespace and commentsbetwe
Author: larry
Date: Mon Apr 10 11:04:44 2006
New Revision: 8625
Modified:
doc/trunk/design/syn/S02.pod
Log:
Refactored long dot and embedded comments to be more orthogonal, so that
foo.#{ bar }.baz is now just a long dot whose happens to match #{}.
Modified: doc/trunk/design/syn/S02.pod
===
23 matches
Mail list logo