Skip to content

Commit

Permalink
Clarify junctional short-circuiting
Browse files Browse the repository at this point in the history
Closes #2120
  • Loading branch information
zoffixznet committed Jun 24, 2018
1 parent d6f2079 commit 2c92134
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions doc/Type/Junction.pod6
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ C<Junction> come into play:
say %h{one <foo bar>}:exists; # OUTPUT: «one(True, True)␤»
say so %h{one <foo bar>}:exists; # OUTPUT: «False␤»
Note that the compiler is allowed to parallelize and short-circuit
autothreading (and Junction behavior in general), so it is usually an error
to autothread junctions over code with side effects.
Note that the compiler is allowed, but not required, to parallelize
and, where possible, short-circuit autothreading (and Junction behavior
in general), so it is usually an error to autothread junctions over code
with side effects. When short-circuiting is involved (e.g. when evaluating
a L<Junction> in boolean context), its order is not guaranteed and is done
for performance purposes only.
Junctions are meant to be used as matchers in boolean context; introspection
of junctions is not supported. If you feel the urge to introspect a junction,
Expand Down

0 comments on commit 2c92134

Please sign in to comment.