Author: masak Date: 2010-06-22 16:40:29 +0200 (Tue, 22 Jun 2010) New Revision: 31409
Modified: docs/Perl6/Spec/S29-functions.pod docs/Perl6/Spec/S32-setting-library/Basics.pod Log: [S29, S32] removed eqv() and cmp() functions They don't confer any particular advantages over the operator forms. The support for their removal on #perl6 was overwhelming. Modified: docs/Perl6/Spec/S29-functions.pod =================================================================== --- docs/Perl6/Spec/S29-functions.pod 2010-06-22 14:31:26 UTC (rev 31408) +++ docs/Perl6/Spec/S29-functions.pod 2010-06-22 14:40:29 UTC (rev 31409) @@ -138,16 +138,10 @@ subset Ordering where Signature | KeyExtractor | Comparator | OrderingPair | Whatever; Used to handle comparisons between things. Generally this -ends up in functions like C<cmp()>, C<eqv()>, C<sort()>, +ends up in functions like C<sort()>, C<min()>, C<max()>, etc., as a $by parameter which provides the information on how two things compare relative to each other. -Note that C<eqv()> and C<cmp()> do almost but not the same thing -since with C<eqv()> you don't care if two things are ordered -increasing or decreasing but only if they are the same or not. -Rather than declare an C<Equiving> type declaration C<Ordering> will -just do double duty. - =over =item Comparator Modified: docs/Perl6/Spec/S32-setting-library/Basics.pod =================================================================== --- docs/Perl6/Spec/S32-setting-library/Basics.pod 2010-06-22 14:31:26 UTC (rev 31408) +++ docs/Perl6/Spec/S32-setting-library/Basics.pod 2010-06-22 14:40:29 UTC (rev 31409) @@ -108,15 +108,9 @@ The following are defined in the C<Any> role: role Any does Mu does Pattern { - our Bool multi sub eqv (Ordering @by, $a, $b) {...} - our Bool multi sub eqv (Ordering $by = &infix:<eqv>, $a, $b) {...} - our multi method clone (::T $self --> T) {...} our multi method clone (::T $self, *%attributes --> T) {...} - our Order multi sub cmp (Ordering @by, $a, $b) {...} - our Order multi sub cmp (Ordering $by = &infix:<cmp>, $a, $b) {...} - our Callable multi method can ($self:, Str $method) {...} our Bool multi method does ($self:, $type) {...} our Bool multi method isa ($self:, $type) {...} @@ -126,16 +120,6 @@ =over -=item eqv - - our Bool multi sub eqv (Ordering @by, $a, $b) - our Bool multi sub eqv (Ordering $by = &infix:<eqv>, $a, $b) - -Returns a Bool indicating if the parameters are equivalent, -using criteria C<$by> or C<@by> for comparisons. C<@by> differs -from C<$by> in that each criterion is applied, in order, -until a non-zero (equivalent) result is achieved. - =item can our Callable multi method can ($self:, Str $method) @@ -157,19 +141,6 @@ The second variant does the same, but any named arguments override an attribute during the cloning process. -=item cmp - - our Order multi sub cmp (Ordering @by, $a, $b) - our Order multi sub cmp (Ordering $by = &infix:<cmp>, $a, $b) - -Returns C<Order::Increase>, or C<Order::Same>, or C<Order::Decrease> -(which numify to -1, 0, +1 respectively) indicating if parameter C<$a> should -be ordered before/tied with/after parameter C<$b>, using criteria -C<$by> or C<@by> for comparisons. C<@by> differs from C<$by> -in that each criterion is applied, in order, until a non-zero -(tie) result is achieved. If the values are not comparable, -returns an C<Order> type object that is undefined. - =item does our Bool multi method does ($self:, $type)