Author: masak
Date: 2009-04-04 11:32:02 +0200 (Sat, 04 Apr 2009)
New Revision: 26069
Modified:
docs/Perl6/Spec/S09-data.pod
Log:
[S09] added table of operations that autovivify
Modified: docs/Perl6/Spec/S09-data.pod
===================================================================
--- docs/Perl6/Spec/S09-data.pod 2009-04-04 04:48:37 UTC (rev 26068)
+++ docs/Perl6/Spec/S09-data.pod 2009-04-04 09:32:02 UTC (rev 26069)
@@ -1230,6 +1230,19 @@
autovivification is defined in terms of protoobjects rather than failure,
it still works under "use fatal".
+This table solidifies the intuition that an operation pertaining to some data
+structure causes the protoobject to autivivify to such an object:
+
+ operation autovivifies to
+ ========= ===============
+ push, unshift, .[] Array
+ .{}, .<> Hash
+
+In addition to the above data structures autovivifying, C<++> and C<--> will
+cause an C<Int> to appear, C<~=> will create a C<Str> etc; but these are
+natural consequences of the operators working on C<Failure>, qualitatively
+different from autovivifying containers.
+
The type of the protoobject returned by a non-successful lookup should
be identical to the type that would be returned for a successful lookup.