Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[svn:perl6-synopsis] r11971 - doc/trunk/design/syn

5 views
Skip to first unread message

la...@cvs.perl.org

unread,
Sep 12, 2006, 2:20:04 PM9/12/06
to perl6-l...@perl.org
Author: larry
Date: Tue Sep 12 11:20:04 2006
New Revision: 11971

Modified:
doc/trunk/design/syn/S03.pod

Log:
Further clarifications and fixups.


Modified: doc/trunk/design/syn/S03.pod
==============================================================================
--- doc/trunk/design/syn/S03.pod (original)
+++ doc/trunk/design/syn/S03.pod Tue Sep 12 11:20:04 2006
@@ -14,7 +14,7 @@
Date: 8 Mar 2004
Last Modified: 12 Sep 2006
Number: 3
- Version: 59
+ Version: 60

=head1 Changes to Perl 5 operators

@@ -982,7 +982,7 @@

Likewise, from the fact that list context flattens inner arrays and
lists, it follows that a reduced assignment does no special syntactic
-dwimmery, and hence only scalar assigments are supported. Therefore
+dwimmery, and hence only scalar assignments are supported. Therefore

[=] $x, @y, $z, 0
[+=] $x, @y, $z, 1
@@ -1067,10 +1067,17 @@
@a Xcmp @b Xcmp @c # ILLEGAL
@a Xeq @b Xeq @c # ok

+In fact, though the C<X> operators are all list associative
+syntactically, the underlying operator is always applied with its
+own associativity.
+
Unlike bare C<X>, the C<X,> form flattens much like C<[,]> does.

<a b> X, <1 2> # 'a', '1', 'a', '2', 'b', '1', 'b', '2'

+Note that only the first term of an C<X> operator may reasonably be
+an infinite list.
+
=head1 Junctive operators

C<|>, C<&>, and C<^> are no longer bitwise operators (see
@@ -1183,7 +1190,7 @@
my ($b, $c); # okay
my $b, $c; # wrong: "Use of undeclared variable: $c"

-Types occuring between the declarator and the signature are distributed into
+Types occurring between the declarator and the signature are distributed into
each variable:

my Dog ($b, $c);
@@ -1459,6 +1466,7 @@
['a', '1'], ['a', '2'], ['b', '1'], ['b', '2']

It is really a variant of the C<X> metaoperator mentioned earlier.
+
=head1 Minimal whitespace DWIMmery

Whitespace is no longer allowed before the opening bracket of an array

Daniel Hulme

unread,
Sep 12, 2006, 3:03:02 PM9/12/06
to perl6-l...@perl.org
> +Note that only the first term of an C<X> operator may reasonably be
> +an infinite list.
Now all we need is a variant that does the diagonal order and we'll be
home and dry.


'a'..* diagX 1..*

->

['a', 1],


['a', 2],
['b', 1],

['a', 3],
['b', 2],
['c', 1],
['a', 4],
['b', 3],
['c', 2],
['d', 1],
and so on.

--
Every program eventually reaches a point where it becomes harder to make
a simple change than to rewrite the program from scratch. Unfortunately,
when this point is reached, it is far too late to consider rewriting it.
http://surreal.istic.org/ They knew about the decepticons.

0 new messages