Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

0 views
Skip to first unread message

la...@cvs.perl.org

unread,
Aug 17, 2006, 7:45:21 PM8/17/06
to perl6-l...@perl.org
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 <la...@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

0 new messages