Author: masak
Date: 2009-12-17 11:45:37 +0100 (Thu, 17 Dec 2009)
New Revision: 29352
Modified:
docs/Perl6/Spec/S03-operators.pod
docs/Perl6/Spec/S32-setting-library/Basics.pod
Log:
kill off REJECTS
It was generally agreed on #perl6 that the REJECTS method doesn't add
anything to the functionality of smartmatching, except perhaps confusion.
Modified: docs/Perl6/Spec/S03-operators.pod
===================================================================
--- docs/Perl6/Spec/S03-operators.pod 2009-12-17 02:35:41 UTC (rev 29351)
+++ docs/Perl6/Spec/S03-operators.pod 2009-12-17 10:45:37 UTC (rev 29352)
@@ -15,8 +15,8 @@
Created: 8 Mar 2004
- Last Modified: 28 Nov 2009
- Version: 181
+ Last Modified: 17 Dec 2009
+ Version: 182
=head1 Overview
@@ -3346,8 +3346,7 @@
The exact form of the underlying type-based method dispatch is:
- X.ACCEPTS($_) # for ~~
- X.REJECTS($_) # for !~~
+ X.ACCEPTS($_)
As a single dispatch call this pays attention only to the type of
C<X> initially. The C<ACCEPTS> method interface is defined by the
@@ -3357,10 +3356,6 @@
an C<Any> on the left above. Or the class may choose to provide
multiple C<ACCEPTS> multi-methods within the class, and these
will then redispatch within the class based on the type of C<$_>.
-The class may also define one or more C<REJECTS> methods; if it does
-not, the default C<REJECTS> method from the C<Pattern> role defines
-it in terms of a negated C<ACCEPTS> method call. This generic method
-may be less efficient than a custom C<REJECTS> method would be, however.
The smartmatch table is primarily intended to reflect forms and types that
are recognized at compile time. To avoid an explosion of entries,
@@ -3381,7 +3376,7 @@
Buf Str or Array of Int
(Note, however, that these mappings can be overridden by explicit
-definition of the appropriate C<ACCEPTS> and C<REJECTS> methods.
+definition of the appropriate C<ACCEPTS> methods.
If the redefinition occurs at compile time prior to analysis of the
smart match then the information is also available to the optimizer.)
Modified: docs/Perl6/Spec/S32-setting-library/Basics.pod
===================================================================
--- docs/Perl6/Spec/S32-setting-library/Basics.pod 2009-12-17 02:35:41 UTC
(rev 29351)
+++ docs/Perl6/Spec/S32-setting-library/Basics.pod 2009-12-17 10:45:37 UTC
(rev 29352)
@@ -19,8 +19,8 @@
Created: 19 Mar 2009 extracted from S29-functions.pod
- Last Modified: 1 Oct 2009
- Version: 3
+ Last Modified: 17 Dec 2009
+ Version: 4
The document is a draft.
@@ -214,7 +214,6 @@
role Pattern {
method ACCEPTS($self:, $other) {...}
- method REJECTS($self:, $other) {...}
}
=over
@@ -223,10 +222,6 @@
Used in smartmatching; see S03.
-=item REJECTS
-
-Used in smartmatching; see S03.
-
=back
=head2 Scalar