develooper Front page | perl.perl6.language | Postings from October 2008

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

Thread Next
From:
larry
Date:
October 11, 2008 11:39
Subject:
[svn:perl6-synopsis] r14593 - doc/trunk/design/syn
Message ID:
20081011183925.25AD4CBA2D@x12.develooper.com
Author: larry
Date: Sat Oct 11 11:39:24 2008
New Revision: 14593

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

Log:
clarify use of [...] and {...} in a signature


Modified: doc/trunk/design/syn/S06.pod
==============================================================================
--- doc/trunk/design/syn/S06.pod	(original)
+++ doc/trunk/design/syn/S06.pod	Sat Oct 11 11:39:24 2008
@@ -13,9 +13,9 @@
 
   Maintainer: Larry Wall <larry@wall.org>
   Date: 21 Mar 2003
-  Last Modified: 17 Mar 2008
+  Last Modified: 11 Oct 2008
   Number: 6
-  Version: 94
+  Version: 95
 
 
 This document summarizes Apocalypse 6, which covers subroutines and the
@@ -1373,6 +1373,19 @@
         ...
     }
 
+Use of the curly form is not allowed where it might be confused with the
+following block's opening curly:
+
+    -> {:$name, :$addr, *%guest_data}, $room_num {	# WRONG
+
+However, as described in the next section, you can always use a
+sub-signature instead:
+
+    -> (:$name, :$addr, *%guest_data), $room_num {	# WRONG
+
+In fact, the [...] and {...} forms are really just extra documentation
+about what you expect.
+
 =head2 Unpacking tree node parameters
 
 You can unpack tree nodes in various dwimmy ways by enclosing the bindings

Thread Next


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