develooper Front page | perl.perl6.language | Postings from March 2009

r25715 - docs/Perl6/Spec

From:
pugs-commits
Date:
March 5, 2009 11:39
Subject:
r25715 - docs/Perl6/Spec
Message ID:
20090305193922.8533.qmail@feather.perl6.nl
Author: lwall
Date: 2009-03-05 20:39:22 +0100 (Thu, 05 Mar 2009)
New Revision: 25715

Modified:
   docs/Perl6/Spec/S02-bits.pod
   docs/Perl6/Spec/S03-operators.pod
Log:
By principle of least damage, minimalize autopromotion of lists in item context
    to Capture rather than to Array.  (Let binding handle any subsequent
    promotions lazily.)


Modified: docs/Perl6/Spec/S02-bits.pod
===================================================================
--- docs/Perl6/Spec/S02-bits.pod	2009-03-05 19:19:26 UTC (rev 25714)
+++ docs/Perl6/Spec/S02-bits.pod	2009-03-05 19:39:22 UTC (rev 25715)
@@ -2413,9 +2413,9 @@
     $a = ('a', 'b');
 
 which, because the list is assigned to a scalar, is autopromoted into
-an Array object:
+a C<Capture> object:
 
-    $a = ['a', 'b'];
+    $a = \('a', 'b');
 
 Likewise, if bound to a scalar parameter, C<< <a b> >> will be
 treated as a single list object, but if bound to a slurpy parameter,

Modified: docs/Perl6/Spec/S03-operators.pod
===================================================================
--- docs/Perl6/Spec/S03-operators.pod	2009-03-05 19:19:26 UTC (rev 25714)
+++ docs/Perl6/Spec/S03-operators.pod	2009-03-05 19:39:22 UTC (rev 25715)
@@ -1977,8 +1977,8 @@
 We still call the values scalars, and talk about "scalar operators", but
 scalar operators are those that put their arguments into item context.
 
-If given a list, this function makes an C<Array> from it.  The function
-is agnostic about any C<Captures> in such a list.  (Use C<@> or C<@@>
+If given a list, this function makes a C<Capture> object from it.  The function
+is agnostic about any C<Captures> embedded in such a capture.  (Use C<@> or C<@@>
 below to force that one way or the other).
 
 Note that this is a list operator, not a unary prefix operator,




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About