Re: Some comments after reading the r7rs public draft Arthur A. Gleckler (07 Jun 2012 20:03 UTC)
Re: [Scheme-reports] Some comments after reading the r7rs public draft Eli Barzilay (08 Jun 2012 09:35 UTC)

Re: [Scheme-reports] Some comments after reading the r7rs public draft Eli Barzilay 08 Jun 2012 09:33 UTC

Yesterday, Aaron W. Hsu wrote:
>
> Thus, instead, I would prefer to clarify that a forced thunk should
> evaluate in a context equivalent to the dynamic context (including
> exception handlers and parameters) of the call to force which first
> requested the delayed expression's value.

That would be good, but most implementations don't do that:

  Petite Chez Scheme Version 8.4
  Copyright (c) 1985-2011 Cadence Research Systems
  > (define foo (let ([c 0]) (delay (begin (set! c (+ c 1)) (/ 1 (- c 1))))))
  > (force foo)
  Exception in /: undefined for 0
  > (force foo)
  1

(Racket does the right thing, but it has an obvious overhead.)

--
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports