Author: larry
Date: Tue Nov  4 15:14:32 2008
New Revision: 14599

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

Log:
Define () as the Nil type


Modified: doc/trunk/design/syn/S02.pod
==============================================================================
--- doc/trunk/design/syn/S02.pod        (original)
+++ doc/trunk/design/syn/S02.pod        Tue Nov  4 15:14:32 2008
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall <[EMAIL PROTECTED]>
   Date: 10 Aug 2004
-  Last Modified: 14 Oct 2008
+  Last Modified: 4 Nov 2008
   Number: 2
-  Version: 139
+  Version: 140
 
 This document summarizes Apocalypse 2, which covers small-scale
 lexical items and typological issues.  (These Synopses also contain
@@ -860,6 +860,7 @@
 built-in C<undef> and C<fail> functions.  (See S04 for how failures
 are handled.)
 
+    Nil         Empty list viewed as an item
     Object      Uninitialized (derivatives serve as protoobjects of classes)
     Whatever    Wildcard (like undef, but subject to do-what-I-mean via MMD)
     Failure     Failure (lazy exceptions, thrown if not handled properly)
@@ -875,6 +876,13 @@
 type is also undefined, but excludes C<Junctions> so that autothreading
 may be dispatched using normal multiple dispatch rules.)
 
+The C<Nil> type is officially undefined as an item but interpolates
+as a null list into list context, and an empty capture into slice
+context.  A C<Nil> object may also carry failure information,
+but if so, the object behaves as a failure only in item context.
+Use C<Failure>/C<undef> when you want to return a hard failure that
+will not evaporate in list context.
+
 =head2 Immutable types
 
 Objects with these types behave like values, i.e. C<$x === $y> is true

Reply via email to