[r6rs-discuss] Laziness Features - reentrancy
On Mon, 16 Oct 2006, Eli Barzilay wrote:
> I was surprised to see that the bullets at the end of section 20.3
> were kept.
I don't know if the existing bullets should be kept. However, I would like to
suggest a bullet option allowing implementations to throw an exception for
reentrant promises, reading as follows:
- An implementation may raise a runtime contract violation
if a promise refers to its own value, i.e., if forcing a promise may cause
the promise to be forced a second time before the value of the first force
has been computed.
In other words, the example in the middle of page 121 may be allowed to throw a
runtime exception.
I think being able to detect this kind of thing is a useful feature, and an
implementation should not be disallowed from providing this feature. I have an
implementation that does this, if someone is interested.
I might make this a formal comment. However, I'll wait and see first - maybe
someone knows of useful applications of reentrant promises of which I am not
aware.
Andre
Received on Wed Oct 18 2006 - 14:23:22 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:01 UTC