Re: [Scheme-reports] Promises that force themselves
John Cowan 08 Feb 2013 05:03 UTC
Alex Shinn scripsit:
> > Arguably, the "first time" the promise is forced is at line 9 in the
> > example, and the "second time" is at line 6. However, at that time
> > line 6 gets executed, no value has been computed *yet*, so presumably
> > this example follows the spirit of the law.
[snip]
> The example in question has been in the report since R4RS, so we can't
> change this without breaking compatibility, and can't do that without
> good reason.
Prose trumps examples, though, and the prose really is ambiguous.
It's not clear whether the value of a forced promise is determined at
the beginning of the force or at its end, which makes it unclear whether
the first time is really at line 6 after all. That's quite independent
of threading considerations.
--
John Cowan cowan@ccil.org http://ccil.org/~cowan
Big as a house, much bigger than a house, it looked to [Sam], a grey-clad
moving hill. Fear and wonder, maybe, enlarged him in the hobbit's eyes,
but the Mumak of Harad was indeed a beast of vast bulk, and the like of him
does not walk now in Middle-earth; his kin that live still in latter days are
but memories of his girth and his majesty. --"Of Herbs and Stewed Rabbit"
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports