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
35 weeks 6 days ago
35 weeks 6 days ago
35 weeks 6 days ago
1 year 5 weeks ago
1 year 10 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 14 weeks ago
1 year 19 weeks ago
1 year 19 weeks ago