User loginNavigation |
archivesScheme language conundrum regarding delay and force.
The following is a question originally posed by Alan Manuel Gloria to the Scheme Standardization list. I think that it is a particularly good question, so I thought I'd share it.
Delay and force have their usual (for PL theory discussions) meanings; the questions are about promises that force themselves in the course of their forcing (ie, forms for which 'force' causes a recursive invocation of 'force' on the same promise). The question becomes interesting when, as in the above case, the recursion is nontail.
Some current implementations return 5 for p and 10 for x and some throw an exception reporting a reentrant promise.
Some implementors claim that 5 for p and 5 for x ought to be allowed since the delayed form returns at the point of forcing and no further computation ought to be done on it, whereas others say that x is visible outside the scope of the delayed computation and therefore the computation of the delayed form must be completed for its side effect on x, even after the force has taken place. FWIW, I agree with the latter point of view.
The questions, roughly, are these:
|
Browse archivesActive forum topics |
Recent comments
3 hours 24 min ago
11 hours 17 min ago
11 hours 42 min ago
17 hours 27 min ago
22 hours 20 min ago
1 day 12 hours ago
1 day 18 hours ago
1 day 18 hours ago
1 day 20 hours ago
1 day 21 hours ago