Skip to content

Commit 2c92134

Browse files
authored
Clarify junctional short-circuiting
Closes #2120
1 parent d6f2079 commit 2c92134

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

doc/Type/Junction.pod6

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,12 @@ C<Junction> come into play:
5656
say %h{one <foo bar>}:exists; # OUTPUT: «one(True, True)␤»
5757
say so %h{one <foo bar>}:exists; # OUTPUT: «False␤»
5858
59-
Note that the compiler is allowed to parallelize and short-circuit
60-
autothreading (and Junction behavior in general), so it is usually an error
61-
to autothread junctions over code with side effects.
59+
Note that the compiler is allowed, but not required, to parallelize
60+
and, where possible, short-circuit autothreading (and Junction behavior
61+
in general), so it is usually an error to autothread junctions over code
62+
with side effects. When short-circuiting is involved (e.g. when evaluating
63+
a L<Junction> in boolean context), its order is not guaranteed and is done
64+
for performance purposes only.
6265
6366
Junctions are meant to be used as matchers in boolean context; introspection
6467
of junctions is not supported. If you feel the urge to introspect a junction,

0 commit comments

Comments
 (0)