Skip to content

Commit 0e2c8fc

Browse files
committed
Moved collate to Any since it's not experimental
Refs #2434.
1 parent 124e701 commit 0e2c8fc

File tree

2 files changed

+16
-24
lines changed

2 files changed

+16
-24
lines changed

doc/Language/experimental.pod6

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,6 @@ not yet rendered properly.
2626
2727
=item X<B<pack>|pack> [TBD]
2828
29-
=head1 Collation
30-
31-
As of Rakudo 2018.11, there is no longer any need to use
32-
C<experimental :collation> any more, as the feature standardized.
33-
34-
The L<collate> and L<<«&infix:<coll>»|/language/operators#index-entry-infix_coll>>
35-
methods are no longer experimental. However, they are affected by the
36-
X<B<$*COLLATION>|$*COLLATION>, which configures the four X<collation levels>.
37-
While the Primary, Secondary and Tertiary mean different things for different scripts,
38-
for the Latin script used in English they mostly correspond with Primary being Alphabetic,
39-
Secondary being Diacritics and Tertiary being Case.
40-
41-
In the example below you can see how when we disable tertiary collation which in
42-
Latin script generally is for case, and also disable quaternary which breaks
43-
any ties by checking the codepoint values of the strings, we get B<Same> back
44-
for B<A> and B<a>:
45-
46-
use experimental :collation;
47-
$*COLLATION.set(:quaternary(False), :tertiary(False));
48-
say 'a' coll 'A'; #OUTPUT: «Same␤»
49-
say ('a','A').collate == ('A','a').collate; # OUTPUT: «True␤»
50-
51-
The $*COLLATION API could change at any time, so use it with caution.
5229
5330
=end pod
5431

doc/Type/Any.pod6

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,22 @@ my %hash = 'aa' => 'value', 'Za' => 'second';
10331033
say %hash.collate; # (aa => value Za => second);
10341034
=end code
10351035
1036-
C<collate> behavior can be changed by using the (so far experimental) L<C<$*COLLATION>|/language/experimental#index-entry-%24%2ACOLLATION-%24%2ACOLLATION> dynamic variable. Please refer to its description in the L<experimental features page|/language/experimental> for further information.
1036+
These methods are affected by the
1037+
X<B<$*COLLATION>|$*COLLATION>, which configures the four X<collation levels>.
1038+
While the Primary, Secondary and Tertiary mean different things for different scripts,
1039+
for the Latin script used in English they mostly correspond with Primary being Alphabetic,
1040+
Secondary being Diacritics and Tertiary being Case.
1041+
1042+
In the example below you can see how when we disable tertiary collation which in
1043+
Latin script generally is for case, and also disable quaternary which breaks
1044+
any ties by checking the codepoint values of the strings, we get B<Same> back
1045+
for B<A> and B<a>:
1046+
1047+
use experimental :collation;
1048+
$*COLLATION.set(:quaternary(False), :tertiary(False));
1049+
say 'a' coll 'A'; #OUTPUT: «Same␤»
1050+
say ('a','A').collate == ('A','a').collate; # OUTPUT: «True␤»
1051+
10371052
10381053
=head2 method cache
10391054

0 commit comments

Comments
 (0)