In "Question on your last change to S02", Larry Wall wrote:
> (By the way, you'll note the utility of being able to talk about a
> postfix by saying .[], which is one of the reasons we allow the optional
> dot there. :)
Can I take this as an indication that the rules for postcircumfix
operators
Larry Wall larry-at-wall.org |Perl 6| wrote:
At compile time the subscript parser really only knows how
many dimensions are referred to by how many semicolons there
are. A subscript that is explicitly cast to @@ is known to be
multidimensional, and interpolates the returned List of Capture into
Larry Wall larry-at-wall.org |Perl 6| wrote:
Now, you'll ask how *-2 works. If you do math on a Whatever object,
it just remembers that offset until the Whatever is given a meaning,
which, in this case, is delayed until the subscripting operator
decides what the size of the next dimension is. A
On Wed, Apr 02, 2008 at 07:03:46PM -0500, John M. Dlugosz wrote:
> During ANSI/ISO standardization, they basically took every phrase and made
> it more and more exact. It went from understandable to leagaleze over a
> period of years, with sentences growing more and more detail. I could
> stil
Audrey Tang audreyt-at-audreyt.org |Perl 6| wrote:
>
> I guess the wording in the last parenthesized parens is insufficiently
> explicit, and maybe we should change it to say that it's really a syntax
> error to use placeholder blocks in statement positions. Sounds reasonable?
>
> Cheers,
> Audrey
Regarding the text just before where you rewrote,
then the compiler adds defaults for you, something like:
-> $x = @foo.shape[0].range,
$y = @foo.shape[1].range { @foo[$x;$y] }
where each such range is autoiterated for you.
That doesn't really work. If
Larry Wall larry-at-wall.org |Perl 6| wrote:
On Tue, Apr 01, 2008 at 09:27:48PM -0500, John M. Dlugosz wrote:
Having done that before, I find the Perl 6 technical docs to be in relative
disarray and imprecise.
Indeed, I welcome all the help I can get on making things more precise.
My o
Thom Boyer 提到:
Audrey Tang wrote:
$code = { "a" => 1, $b, $c ==> print };
The examples above are from L.
According to those rules, that last assignment to $code seems to be a
hash, not code. Or does the C<< ==> >> mean that the contents aren't a
list?
Correct, because "==>" binds loos
Nicholas Clark 提到:
So if the semicolon is replaced with a comma, like this,
my @x := [{1+1}, {2+2}];
the {} acts as a hash constructor, and @x is [{2 => undef}, {4 => undef}] ?
No, {} acts as a closure constructor, and @x contains two closures that
returns 2 and 4 respectively when calle
Author: audreyt
Date: Wed Apr 2 12:04:08 2008
New Revision: 14538
Modified:
doc/trunk/design/syn/S03.pod
Log:
* S03/"Hash composer":
Update the definition to agree with S04/"hash composer", allowing
empty hashes as well as lists beginning with hashes.
Modified: doc/trunk/design/syn/S03
On Wed, Apr 02, 2008 at 10:03:57AM -0700, Larry Wall wrote:
> Yes, current STD has the inside of () and [] as ,
> which throws away all but the last statement. Arguably [] at least
> should probably be though, and maybe () too.
>
> my @x := [{1+1}; {2+2}]; @x is currently [4], should be [2,
Author: larry
Date: Wed Apr 2 11:02:36 2008
New Revision: 14537
Modified:
doc/trunk/design/syn/S02.pod
doc/trunk/design/syn/S03.pod
Log:
typo from Jon Lang++
clarify innards of () and [] slightly
Modified: doc/trunk/design/syn/S02.pod
=
Larry Wall 提到:
> I was originally thinking just loop modifiers, but I suppose
>
> { say $^x } if foo();
>
> also can be made to make some kind of sense, in the same way that
>
> if foo() -> $x { say $x }
>
> is supposed to work.
Right. I've committed the clarification (as a new section
Author: audreyt
Date: Wed Apr 2 10:22:01 2008
New Revision: 14536
Modified:
doc/trunk/design/syn/S04.pod
Log:
* S04: Create a new section, "Statement-level bare blocks"
since its content doesn't really belong in the "do-once loop"
section.
* S04: Also, clarify that statement-level blocks
On Tue, Apr 01, 2008 at 09:27:48PM -0500, John M. Dlugosz wrote:
> Having done that before, I find the Perl 6 technical docs to be in relative
> disarray and imprecise.
Indeed, I welcome all the help I can get on making things more precise.
My own tendency is to emphasize vigor over rigor, so I w
On Thu, Apr 03, 2008 at 12:43:58AM +0800, Audrey Tang wrote:
> Larry Wall 提到:
>> Yes, unless we decide we need something like that for list
>> comprehensions. Maybe looping modifiers allow placeholders in what
>> would otherwise be an error...
>
> Sure. How about this:
>
> "
> Use of a placeholde
On Sun, Mar 30, 2008 at 04:35:56PM -, John M. Dlugosz wrote:
: Meta-question 2: Does this belong on a different mailing list? I'm also
including the documented file maintainer as a direct recipient.
This is the right list. There is no need to cc the maintainers,
since they all read this lis
Author: larry
Date: Wed Apr 2 09:49:48 2008
New Revision: 14535
Modified:
doc/trunk/design/syn/S02.pod
Log:
Another fix suggested by John M. Dlugosz++, whose name I can almost spell now.
Modified: doc/trunk/design/syn/S02.pod
=
Larry Wall 提到:
Yes, unless we decide we need something like that for list
comprehensions. Maybe looping modifiers allow placeholders in what
would otherwise be an error...
Sure. How about this:
"
Use of a placeholder parameter in statement-level blocks triggers a
syntax error, because the pa
Author: larry
Date: Wed Apr 2 09:43:45 2008
New Revision: 14534
Modified:
doc/trunk/design/syn/S02.pod
Log:
Some fossil unspace verbiage cleaned up on recommendation of John M. Dlugosz++
Modified: doc/trunk/design/syn/S02.pod
=
I understand. Thank you.
This ought to be mentioned in S12. Perhaps after the treatment on "my",
explain that "our" is the default, but saying it explicitly allows the
return type to be first.
--John
Audrey Tang audreyt-at-audreyt.org |Perl 6| wrote:
> John M. Dlugosz 提到:
>
>> In S29, there a
On Thu, Apr 03, 2008 at 12:04:47AM +0800, Audrey Tang wrote:
: I guess the wording in the last parenthesized parens is insufficiently
: explicit, and maybe we should change it to say that it's really a syntax
: error to use placeholder blocks in statement positions. Sounds reasonable?
Yes, unless
Hmm, both of you are kinda going off on a tangent here. The meaning of
the Whatever represented by * is neither something that gets magically
interpreted before postcircumfix:<[ ]>, nor is it a compile-time
rewrite. Context is supplied by binding in Perl 6, and the binding
happens within .[]. It
John M. Dlugosz 提到:
> I just finished another pass on S09, and in this posting I note
> editorial issues with the file that can easily be corrected. This is as
> opposed to subjects for deep discussion, which I'll save for later and
> individual posts.
>
> = on Mixing subscripts
> "Within a C<
Author: audreyt
Date: Wed Apr 2 09:13:06 2008
New Revision: 14533
Modified:
doc/trunk/design/syn/S09.pod
Log:
* S09/Autovivification:
Change the wording "assignment implicitly binds a copy" to
"assignment is treated the same way as binding to a copy container",
because assignment and
John M. Dlugosz 提到:
> But about your answer, "automatically called with no arguments". Isn't
> that what a bare closure normally does anyway? Say, I introduced extra
> {} just for scoping or naming the block, where a statement is expected.
>
> foo;
> bar;
> { my $temp= foo; bar(temp); } #forget a
Author: audreyt
Date: Wed Apr 2 08:56:38 2008
New Revision: 14532
Modified:
doc/trunk/design/syn/S09.pod
Log:
* S09/"Parallelized parameters and autothreading":
@a[$i, $j] etc in examples should read @a[$i; $j] instead.
Also, clarify that "do -> { ... }" is intentionally calling the
b
On Wed, Apr 02, 2008 at 11:02:37PM +0800, Audrey Tang wrote:
: Sanity-check before I check it in?
I'm probably not the best person to ask about *sanity*, but it looks
pretty darn good to me. :)
Larry
Audrey Tang 提到:
> John M. Dlugosz 提到:
>
>> = on Parallelized parameters and autothreading
>>
>> use autoindex;
>> do { @c[$^i, $^j, $^k, $^l] = @a[$^i, $^j] * @b[$^k, $^l] };
>>
>> Shouldn't those be semicolons? Ditto for subsequent examples.
>> Also, what does the "do" do? I think it is
John M. Dlugosz 提到:
> = on Parallelized parameters and autothreading
>
> use autoindex;
> do { @c[$^i, $^j, $^k, $^l] = @a[$^i, $^j] * @b[$^k, $^l] };
>
> Shouldn't those be semicolons? Ditto for subsequent examples.
> Also, what does the "do" do? I think it is only meaningful if there
I just finished another pass on S09, and in this posting I note editorial
issues with the file that can easily be corrected. This is as opposed to
subjects for deep discussion, which I'll save for later and individual posts.
= on Mixing subscripts
"Within a C<.[]> indexing operation..."
Why the
John M. Dlugosz 提到:
> In S29, there are definitions like
>our Capture method shape (@array: ) is export
> But in S12 there is no mention as to what an "our" method is. It states that
> "my" is used to make private methods, and "^" to make class methods.
> I think this is a doc relic and shoul
32 matches
Mail list logo