[Swift-devel] Functionality request: best effort execution
Ben Clifford
benc at hawaga.org.uk
Tue Jul 14 02:09:16 CDT 2009
One way of putting in ambiguity here is something like the AMB(iguous)
operator, which looks very similar to Karajan's race behaviour.
a AMB b evaluates to either a or b but its not defined which and so the
runtime can pick which.
That has no particular preference for a result, though in Tibi's use case
one of the results is probably preferred.
You could change the semantics so that it returns a unless a fails in
which case it evaluates and returns b, unless b fails in which case the
expression fails to evaluate.
Both of the above descriptions can be extended to more than two operands
in a natural way.
--
More information about the Swift-devel
mailing list