Re: [Scheme-reports] Some comments after reading the r7rs public draft Ray Dillinger (10 Jun 2012 03:53 UTC)

Re: [Scheme-reports] Some comments after reading the r7rs public draft Ray Dillinger 10 Jun 2012 03:52 UTC

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/09/2012 07:22 PM, Alex Shinn wrote:
> On Sun, Jun 10, 2012 at 9:57 AM, Ray Dillinger <bear@sonic.net>
> wrote:
>>
>> Scheme's "delay" and "force" have never really made strong
>> enough guarantees that delayed promises will not be computed
>> unless forced.  The language allows implicit forcing whenever a
>> promise is referred to.
>
> If this were true it would definitely make delay completely
> unusable, however it is not true.
>
> What RnRS allow is "implicit forcing" when passing a promise to a
> primitive "like `cdr' and`+'", with the example
>
> (+ (delay (* 3 7)) 13) => 34
>
> given.  This is obviously vague, but the intent is that primitives
> which immediately need the actual value are allowed to do an
> implicit force.  Other primitives like "cons" for instance, don't
> care what the value is and should not perform an implicit force -
> otherwise you couldn't build a stream.

Due to the "vagueness," I have (since R3RS at least)
regarded streams relying on delayed functions as a bit
of magic that works, not because the implementors are
following the spec, but rather because implementors are
flatly refusing to follow a spec which permits a
completely useless result in such a way as to actually
*produce* a completely useless result.

If you claim that the behavior people have been
implementing is something that the spec has required
all along, I think you are wrong.  If you claim that
it is something the spec has permitted and ought to
have required all along, I think you are right.

			Bear

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJP1BoBAAoJEAOzWkqOibfNHvoH/2UjMMI2zz3t5uL79u7fhElr
6teCsq/srWRMroBt+ZPv9zYpK7t0cOskntPSWCjsgSYY4gY6Xk78vTXN/5Dh1a8B
Cx6E13YHAUBU9yUJfzOh+v70er1F+qouOunWiL7xoe1ILQjdY6Xb1ZnwPHtpjbeI
R61bqZETKj416LXOW6JFNMEQ++8wJ8hid6gWrnkfDoslxbX9+56F4Xp+w/NtyMXf
vNOw6B4UWPxu/eeue75AMsjCGo8XU4psJDiKhizGmdMU5/Vz0wwvRaP/NN9LfGTW
eRn05ypj3/VfLzCDyoTF8fNpIvr/A3qEl14SpvC9DlU9K1giUP1IT6zOLOwz+xw=
=NQNG
-----END PGP SIGNATURE-----

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