Author: lwall
Date: 2010-07-10 19:21:35 +0200 (Sat, 10 Jul 2010)
New Revision: 31613

Modified:
   docs/Perl6/Spec/S06-routines.pod
   docs/Perl6/Spec/S12-objects.pod
   docs/Perl6/Spec/S14-roles-and-parametric-types.pod
   docs/Perl6/Spec/S17-concurrency.pod
Log:
[specs] add C<also> declarator to prefix any trait to be applied to the outer 
declaration
this lets us say "also is Int" without the 'is' conflicting with Test's is 
function
and it's extensible as new trait_mods are added


Modified: docs/Perl6/Spec/S06-routines.pod
===================================================================
--- docs/Perl6/Spec/S06-routines.pod    2010-07-10 17:17:14 UTC (rev 31612)
+++ docs/Perl6/Spec/S06-routines.pod    2010-07-10 17:21:35 UTC (rev 31613)
@@ -16,8 +16,8 @@
 
     Created: 21 Mar 2003
 
-    Last Modified: 9 Jul 2010
-    Version: 139
+    Last Modified: 10 Jul 2010
+    Version: 140
 
 This document summarizes Apocalypse 6, which covers subroutines and the
 new type system.
@@ -1859,9 +1859,9 @@
 adverbial syntax, except that that colon may be omitted or doubled depending
 on the degree of ambiguity desired:
 
-    is ::Foo[...]       # definitely a parameterized typename
-    is :Foo[...]        # definitely a pair with a list
-    is Foo[...]         # depends on whether Foo is predeclared as type
+    sub x() is ::Foo[...]       # definitely a parameterized typename
+    sub x() is :Foo[...]        # definitely a pair with a list
+    sub x() is Foo[...]         # depends on whether Foo is predeclared as type
 
 =over
 

Modified: docs/Perl6/Spec/S12-objects.pod
===================================================================
--- docs/Perl6/Spec/S12-objects.pod     2010-07-10 17:17:14 UTC (rev 31612)
+++ docs/Perl6/Spec/S12-objects.pod     2010-07-10 17:21:35 UTC (rev 31613)
@@ -13,8 +13,8 @@
 
     Created: 27 Oct 2004
 
-    Last Modified: 9 Jul 2010
-    Version: 104
+    Last Modified: 10 Jul 2010
+    Version: 105
 
 =head1 Overview
 
@@ -137,14 +137,20 @@
 
     class Dog is Mammal does Pet {...}
 
-You may put these inside as well:
+You may put these inside as well by use of the C<also> declarator:
 
     class Dog {
-        is Mammal;
-        does Pet;
+        also is Mammal;
+        also does Pet;
         ...
     }
 
+(However, the C<also> declarator is primarily intended for use
+in roles, to distinguish class traits that might not be properly
+understood as generic when placed in the role header, which tends to
+communicate the false impression that the trait in question is to be
+applied directly to the role rather than to the composed class.)
+
 Every object (including any class-based object) delegates to an instance of
 its metaclass.  You can get at the metaclass of any object via the
 C<HOW> method, which returns an instance of the metaclass.  A "class" object 
is just considered an "empty"

Modified: docs/Perl6/Spec/S14-roles-and-parametric-types.pod
===================================================================
--- docs/Perl6/Spec/S14-roles-and-parametric-types.pod  2010-07-10 17:17:14 UTC 
(rev 31612)
+++ docs/Perl6/Spec/S14-roles-and-parametric-types.pod  2010-07-10 17:21:35 UTC 
(rev 31613)
@@ -15,8 +15,8 @@
 
     Created: 24 Feb 2009 (extracted from S12-objects.pod)
 
-    Last Modified: 8 Jul 2009
-    Version: 8
+    Last Modified: 10 Jul 2009
+    Version: 9
 
 =head1 Overview
 
@@ -157,7 +157,7 @@
 that is considered an implementation detail:
 
     role Pet {
-        is Friend;
+        also is Friend;
     }
 
 =head2 Compile-time Composition
@@ -169,12 +169,19 @@
 or equivalently, within the body of the class closure:
 
     class Dog {
-        is Mammal;
-        does Pet;
-        does Sentry;
+        also is Mammal;
+        also does Pet;
+        also does Sentry;
         ...
     }
 
+or
+
+    class Dog {
+        also is Mammal does Pet does Sentry;
+        ...
+    }
+
 There is no ordering dependency among the roles.
 
 A class's explicit method definition hides any role definition of

Modified: docs/Perl6/Spec/S17-concurrency.pod
===================================================================
--- docs/Perl6/Spec/S17-concurrency.pod 2010-07-10 17:17:14 UTC (rev 31612)
+++ docs/Perl6/Spec/S17-concurrency.pod 2010-07-10 17:21:35 UTC (rev 31613)
@@ -16,8 +16,8 @@
 
     Created: 13 Jun 2005
 
-    Last Modified: 27 Feb 2009
-    Version: 4
+    Last Modified: 10 Jul 2010
+    Version: 5
 
 This draft document is a paste together from various sources.  The bulk of it 
is simply
 the old S17-concurrency.pod, which dealt only with concurrency.  Signals were 
added from
@@ -188,7 +188,7 @@
         my $a2 = alarm(2);
         sleep 10;
         CATCH {
-            is critical; # if you don't want $a2 to be raised inside this
+            also is critical; # if you don't want $a2 to be raised inside this
             when Sig::ALARM { ... }
         }
     }
@@ -406,7 +406,7 @@
  }
 
  if ($update) {
-     is critical;
+     also is critical;
      # code accessing external info, not to be interrupted
  }
 
@@ -609,15 +609,15 @@
     module Blah;
     {
 
-        is atomic;   # contend/maybe/whatever other rollback stuff
-                     # limitation: no external IO (without lethal warnings 
anyway)
-                     # can't do anything irreversible
+        also is atomic;   # contend/maybe/whatever other rollback stuff
+                          # limitation: no external IO (without lethal 
warnings anyway)
+                          # can't do anything irreversible
 
-        is critical; # free to do anything irreversible
-                     # means "don't interrupt me"
-                     # in system with critical section, no interrupts from
-                     # other threads will happen during execution
-                     # you can't suspend me
+        also is critical; # free to do anything irreversible
+                          # means "don't interrupt me"
+                          # in system with critical section, no interrupts from
+                          # other threads will happen during execution
+                          # you can't suspend me
 
         my $boo is export;
         $boo = 1;

Reply via email to