Re: [Scheme-reports] Formal Comment: R7RS 'eqv?' cannot be used for reliable memoization
Ray Dillinger 24 Nov 2012 01:56 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/20/2012 02:47 PM, John Cowan wrote:
> Mark H Weaver scripsit:
>> What I want, indeed what I *require*, is the ability to memoize
>> procedures without having to worry that my code might produce the
>> wrong answers on some future implementation of R7RS.
> 1) So use a memoization comparison function that handles NaN,
> negative zero, and the infinities specially.
> 2) You can't be sure that an R7RS implementation will provide
> these anyway.
Let's think about these two statements in combination with one another.
First: is it the case that an implementation which does not provide
NaN and -0.0 can be a correct implementation of R7RS? If so, is there
a standard way for portable code to discover whether the hosting
implementation does or does not provide them without invoking an error?
Because that's important. Here is why.
Assume someone is writing code in an implementation which does not
provide NaN. How would they produce code which handles NaN, -0.0,
etc, specially but does not invoke a syntax error on their own nor any
other implementation?
>> Therefore, it appears likely that I will not be able to use
>> R7RS.
> So be it.
Uh, that's kind of a "wrong answer" on this level. It is the goal
of this process to produce something that's generally usable, right?
Bear
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJQsCk5AAoJEAOzWkqOibfNFJsH/A/H2vcpDF7wNtp1qsxSCubW
7zmv41C7TCt44XACYevz3EZGoIORdxwEueNB5z1wktd+uX4sdEapuFwusfSpi7Xu
Hv6fWb6gYjnyXuVORF2AOCu9KNMDT5t+gjqd4id8OciwOqKn2WOHU/5Er42ou4iz
GM8mdWHQ2YHcCLUjU4aoS/8N4xbEDo5bM4vtN2JcnR4Tv1MThD6mqj3CBLok6ii2
0dtfHMJmFOlUhruh9fiOTmWI/syvdiO4RTtXAZnJXMWyV6nHO+4MPtSXU08zchfr
eqgZHgzNFdB3bTTbvRwNUg3gH0UwS+jRSVdVhc01d3oUo2tUo9J3ofBQ9ZolxZA=
=t7mO
-----END PGP SIGNATURE-----
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports