On 06/12/2012 12:07 PM, John Cowan wrote:
> Per Bothner scripsit:
>
>> (Though a future version of Kawa might optimize (delay 4) to 4,
>> that's OK, since I can't think of a use case for you needing
>> the delay to evaluate specifically to a promise.)
>
> As I keep saying, the use case is to be able to write procedures that
> are guaranteed to return a promise that the caller may safely force.
> The only way to accomplish this in the presence of insta-forcing is
> to require `force` to return its argument if it is not a promise.

Certainly: If you have automatic forcing, then I'm pretty sure you
want force to be a no-op when passed a non-promise.  And definitely
if you allow optimizing (delay 4) to 4.  Kawa does this:
(force (+ 4 5)) ==> 9
-- 
        --Per Bothner
[email protected]   http://per.bothner.com/

_______________________________________________
Scheme-reports mailing list
[email protected]
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports

Reply via email to