On Tue, 08 Sep 2009 04:20:43 -0400, Antonio Vieiro <[email protected]> wrote:
> For more insight on concurrent evaluation of arguments in Scheme, I've > found > this explanation illustrative: > > http://okmij.org/ftp/Computation/serialization.html > > Oleg explains *what* "serializable concurrency" means in R5RS/R6RS. He > does > not explain the reasons *why* this constraint remains in R5RS/R6RS, > though. To restate what is in the article, serializable concurrency means that R5RS and R6RS do not actually prevent parallelizing optimizations on procedure application: the sequential restriction prevents non-serializable concurrency from occuring, but allows for any form of serializable concurrency. It appears to me then, that this isn't as big an issue as people seem to make it. The impression I have seen on this list is that the current standards do not allow you to parallelize evaluations because of the restriction on sequential order. However, it *is* legal when the concurrency will be serializable, because there is no recognizable difference in the results. Oleg touches on the reasons for the restriction when he discusses that non-serializable concurrency is considered a *very* bad thing in the context of database transactions. I imagine that this argument extends to evaluation order in this case because if a program performs one of these "bad" parallel operations, you will get an answer that doesn't seem to make any sense at all, unless you really know that the code is getting this kind of concurrent treatment. This has the benefit of ensuring that whether or not a Scheme performs this optimization on the code, you can't get a result that a non-concurrent system couldn't also get. Thus, I'm inclined, at the moment, to agree with the wording in the standards as is: it allows for as much optimization as is reasonable, while still ensuring reasonable behavior of the programs; for some definition of reasonable. Overall, it seems like the standards writers may have known what they were about after all. :-) Of course, I could be wrong, but I have yet to hear the authorities from the time explain their decision any more clearly than the above article. Aaron W. Hsu -- Of all tyrannies, a tyranny sincerely exercised for the good of its victims may be the most oppressive. -- C. S. Lewis _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
