@@ -90,7 +90,7 @@ On the other hand, X<P6opaque> is the default representation used for
90
90
all objects in Raku.
91
91
92
92
class Thar {};
93
- say Thar.REPR; #OUTPUT: «P6opaque»
93
+ say Thar.REPR; # OUTPUT: «P6opaque»
94
94
95
95
The L < metaobject protocol|/language/mop > uses it by default for every object
96
96
and class unless specified otherwise; for that reason, it is in general not
@@ -110,14 +110,22 @@ routines.
110
110
111
111
= head2 X < C < is implementation-detail > ,traits> trait
112
112
113
- Note: this trait is available in Rakudo compiler starting from 2020.05 release.
113
+ Note: this trait has been available in Rakudo compiler starting from 2020.05 release.
114
114
115
- The C < is > with C < implementation-detail > argument is used by Raku
116
- language implementations and module authors to mark particular
117
- routines (including methods) as not meant to be a public API.
115
+ This trait is used by Raku language implementations and module authors
116
+ to mark particular routines (including methods) as not meant to be a
117
+ part of public API. While such routines can be found when looked up
118
+ directly, they will not appear in results of introspection:
118
119
119
- Applying this trait makes the C < is-implementation-detail > method on
120
- L < Code|/type/Code > to return C < True > .
120
+ my &do-not-use-routine = CORE::<&DYNAMIC>;
121
+ say CORE::.keys.grep(* eq '&DYNAMIC'); # OUTPUT: «()»
122
+
123
+ Such routines are not meant for use by users and their behavior and availability can be changed
124
+ anytime.
125
+
126
+ Applying this trait makes the C < is-implementation-detail > method called on
127
+ L < Code|/type/Code > to return C < True > , thus giving a hint to the user not to use it
128
+ if they are not willing to maintain this code in case of changes for years to come:
121
129
122
130
my &fail-routine = &fail;
123
131
unless &fail-routine.is-implementation-detail {
0 commit comments