[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] Formal Comment: R7RS 'eqv?' cannot be used for reliable memoization
-----BEGIN PGP SIGNED MESSAGE-----
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
>> Therefore, it appears likely that I will not be able to use
> 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?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
Scheme-reports mailing list