r32009 -[S02] revert Nil to undefined singleton value for masak++ et al.++

2010-08-16 Thread pugs-commits
Author: lwall
Date: 2010-08-16 16:13:31 +0200 (Mon, 16 Aug 2010)
New Revision: 32009

Modified:
   docs/Perl6/Spec/S02-bits.pod
Log:
[S02] revert Nil to undefined singleton value for masak++ et al.++
(Note, despite being a kind of "bottom", it is not a type as it was before.)


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2010-08-16 07:49:05 UTC (rev 32008)
+++ docs/Perl6/Spec/S02-bits.pod2010-08-16 14:13:31 UTC (rev 32009)
@@ -13,8 +13,8 @@
 
 Created: 10 Aug 2004
 
-Last Modified: 16 Jul 2010
-Version: 220
+Last Modified: 16 Aug 2010
+Version: 221
 
 This document summarizes Apocalypse 2, which covers small-scale
 lexical items and typological issues.  (These Synopses also contain
@@ -2153,22 +2153,27 @@
 you can think of PerlĀ 5 references as a degenerate form of C
 when you want to refer only to a single item.
 
-The empty C is a value with a special name: C.  It is the
-named equivalent of the empty C<()> list.  The C value returns
-C if you iterate it or try to get a positional value from it, but
+There is a special C value named C.  It means "there is no
+value here".  It is the undefined equivalent of the empty C<()> list, except 
that the
+latter is defined and means "there are 0 arguments here".  The C value 
returns
+itself if you iterate it or try to get a positional value from it, but
 interpolates as a null list into flat context, and an empty C
 into slice context.  Since method calls are performed directly on
-any object, C returns C just as C<().defined> does.
+any object, C returns C while C<().defined> returns 
C.
 
-Assigning or binding C to any scalar container causes the
+Assigning C to any scalar container causes the
 container to throw out any contents and restore itself to an
 uninitialized state (after which it will contain a type object
 appropriate to the declared type of the container, where C
-is the default type).
+is the default type).  Binding of C has a similar result, except that 
binding
+C to a parameter with a default causes that parameter to be set to its
+default value rather than an undefined value, as if the argument had not
+been supplied.
 
 Assigning or binding C to any composite container (such as an
 C or C) empties the container, resetting it back to an
-uninitialized state.  The container object itself remains defined.
+uninitialized state.  The container object itself the becomes undefined.
+(Asssignment of C<()> leaves it defined.)
 
 The C statement prefix will eagerly evaluate any block or
 statement, throw away the results, and instead return the C value.



r32010 -[S02] typo fix.

2010-08-16 Thread pugs-commits
Author: qiuhw
Date: 2010-08-16 16:21:14 +0200 (Mon, 16 Aug 2010)
New Revision: 32010

Modified:
   docs/Perl6/Spec/S02-bits.pod
Log:
[S02] typo fix.


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2010-08-16 14:13:31 UTC (rev 32009)
+++ docs/Perl6/Spec/S02-bits.pod2010-08-16 14:21:14 UTC (rev 32010)
@@ -2172,7 +2172,7 @@
 
 Assigning or binding C to any composite container (such as an
 C or C) empties the container, resetting it back to an
-uninitialized state.  The container object itself the becomes undefined.
+uninitialized state.  The container object itself then becomes undefined.
 (Asssignment of C<()> leaves it defined.)
 
 The C statement prefix will eagerly evaluate any block or



r32013 -[S02] spec which methods Nil responds to,

2010-08-16 Thread pugs-commits
Author: lwall
Date: 2010-08-16 19:49:53 +0200 (Mon, 16 Aug 2010)
New Revision: 32013

Modified:
   docs/Perl6/Spec/S02-bits.pod
Log:
[S02] spec which methods Nil responds to,
and that it propagates Nil on unrecognized methods


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2010-08-16 14:30:39 UTC (rev 32012)
+++ docs/Perl6/Spec/S02-bits.pod2010-08-16 17:49:53 UTC (rev 32013)
@@ -14,7 +14,7 @@
 Created: 10 Aug 2004
 
 Last Modified: 16 Aug 2010
-Version: 221
+Version: 222
 
 This document summarizes Apocalypse 2, which covers small-scale
 lexical items and typological issues.  (These Synopses also contain
@@ -2153,14 +2153,23 @@
 you can think of PerlĀ 5 references as a degenerate form of C
 when you want to refer only to a single item.
 
-There is a special C value named C.  It means "there is no
-value here".  It is the undefined equivalent of the empty C<()> list, except 
that the
-latter is defined and means "there are 0 arguments here".  The C value 
returns
-itself if you iterate it or try to get a positional value from it, but
+There is a special C value named C.  It means "there
+is no value here".  It is the undefined equivalent of the empty
+C<()> list, except that the latter is defined and means "there are
+0 arguments here".  The C value returns itself if you iterate
+it or try to get a positional value from it via subscripting, but
 interpolates as a null list into flat context, and an empty C
-into slice context.  Since method calls are performed directly on
-any object, C returns C while C<().defined> returns 
C.
+into slice context.  In either case, a warning is issued.
 
+Since method calls are performed directly on any object, C
+can respond to certain method calls.  C returns
+C (whereas C<().defined> returns C).  C also
+returns C.  C is always false.  C and
+C return C<"Nil">.  C returns '' with a warning.
+C returns 0 with a warning.  Any undefined method call
+on C returns C, so that C propagates down method
+call chains.
+
 Assigning C to any scalar container causes the
 container to throw out any contents and restore itself to an
 uninitialized state (after which it will contain a type object



r32014 -[S02,S03] allow Nil to smartmatch a Nil

2010-08-16 Thread pugs-commits
Author: lwall
Date: 2010-08-16 19:54:52 +0200 (Mon, 16 Aug 2010)
New Revision: 32014

Modified:
   docs/Perl6/Spec/S02-bits.pod
   docs/Perl6/Spec/S03-operators.pod
Log:
[S02,S03] allow Nil to smartmatch a Nil


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2010-08-16 17:49:53 UTC (rev 32013)
+++ docs/Perl6/Spec/S02-bits.pod2010-08-16 17:54:52 UTC (rev 32014)
@@ -2164,7 +2164,7 @@
 Since method calls are performed directly on any object, C
 can respond to certain method calls.  C returns
 C (whereas C<().defined> returns C).  C also
-returns C.  C is always false.  C and
+returns C.  C matches only a C value.  C and
 C return C<"Nil">.  C returns '' with a warning.
 C returns 0 with a warning.  Any undefined method call
 on C returns C, so that C propagates down method

Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2010-08-16 17:49:53 UTC (rev 32013)
+++ docs/Perl6/Spec/S03-operators.pod   2010-08-16 17:54:52 UTC (rev 32014)
@@ -15,8 +15,8 @@
 
 Created: 8 Mar 2004
 
-Last Modified: 26 Jun 2010
-Version: 212
+Last Modified: 16 Aug 2010
+Version: 213
 
 =head1 Overview
 
@@ -3512,6 +3512,7 @@
 Any   Numeric   numeric equality+$_ == X
 Any   Stringy   string equality ~$_ eq X
 Any   Whatever  always matches  True
+Any   Nil   is nil  $_ === Nil
 
 Hash  Pair  test hash mapping   $_{X.key} ~~ X.value
 Any   Pair  test object attribute   ?."{X.key}" === ?X.value (e.g. 
filetests)