develooper Front page | perl.perl6.language | Postings from August 2006

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

From:
larry
Date:
August 17, 2006 16:45
Subject:
[svn:perl6-synopsis] r11116 - doc/trunk/design/syn
Message ID:
20060817234521.58C7ACB9BB@x12.develooper.com
Author: larry
Date: Thu Aug 17 16:45:20 2006
New Revision: 11116

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

Log:
Added explicit mention of "self" by suggestion of markjreed++.


Modified: doc/trunk/design/syn/S12.pod
==============================================================================
--- doc/trunk/design/syn/S12.pod	(original)
+++ doc/trunk/design/syn/S12.pod	Thu Aug 17 16:45:20 2006
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall <larry@wall.org>
   Date: 27 Oct 2004
-  Last Modified: 9 Aug 2006
+  Last Modified: 17 Aug 2006
   Number: 12
-  Version: 19
+  Version: 20
 
 =head1 Overview
 
@@ -160,8 +160,9 @@
     method doit (MyName $self: $a, $b, $c) { ... }
     method doit (::?CLASS $self: $a, $b, $c) { ... }
 
-Declaration of the invocant is optional.  You need not declare
-its type, since the lexical class of the invocant is known in any
+Declaration of the invocant is optional.  You may always access the
+current invocant using the keyword C<self>.  You need not declare the
+invocant's type, since the lexical class of the invocant is known in any
 event because methods must be declared in the class of the invocant,
 though of course the actual (virtual) type may be a derived type of
 the lexical type.  You could declare a more restrictive type, but



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