[r6rs-discuss] Implicitly Concurrent Scheme
agj at alum.mit.edu
Mon Nov 23 22:56:25 EST 2009
| Date: Sun, 22 Nov 2009 16:12:37 -0500
| From: "Aaron W. Hsu" <arcfide at sacrideo.us>
| ... This restrictions ensures two things:
| 1) The behavior of the expression in question will never exhibit
| behaviors that cannot be reproduced in a single-threaded
| 2) The programmer need not constantly consider issues of
| threading for every function call, which must happen in the case
| of ICS.
| In other words, removing the restriction makes programs less clear,
| more prone to problems, and hence, less reliable, without actually
| introducing anything new for the user.
Actually, it doesn't! Implicitly-concurrent `map' is already allowed
by the Scheme Reports:
The only RnRS mention of concurrency appears in the description of
Note: Although the order of evaluation is otherwise unspecified,
the effect of any CONCURRENT evaluation of the operator and
operand expressions is constrained to be consistent with some
sequential order of evaluation. The order of evaluation may be
chosen differently for each procedure call.
Because `do', `let', and `letrec' bindings are defined in terms of
(`lambda' and) procedure calls, this restriction applies to them as
But the Reports are silent as to the evaluation order for `map' ...
Thus the programmer who wants to write closed-expressions involving
`map' which have repeatable behavior across all possible RnRS
platforms must write concurrently-repeatable `map' expressions!
More information about the r6rs-discuss