[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: equiv:bound-on-recursion



Aubrey Jaffer wrote:
> The line:
>
>   (define equiv:bound-on-recursion 1000000)
>
> in the Reference Implementation is disturbing.  Does this mean that
> the internal definition of EQUIV? will be exercised only on cases
> specifically contrived for testing?

No.  Circular structures and structures with a great deal
of shared structure occasionally arise in practice.  On
the other hand, equiv:bound-on-recursion should be large
enough to cover the usual case.

One reason the reference implementation defines
equiv:bound-on-recursion as a global variable is to make
the implementation easier to test.  For sample tests, see
http://www.ccs.neu.edu/home/will/Temp/srfi-85tests.sch

Another reason is to make it easier for implementors to
adjust that parameter to fit their systems.  In an interpreted
system that has fast hash tables, that parameter might be
decreased.  In a compiled system with slow hash tables, it
might be increased.

> Also, I suggest that having internal identifiers alias top level
> identifiers does not help readability.

That's a matter of coding style, on which different people
have different opinions.  I tried to make everyone unhappy
by using one style for equiv? and a different style for
dag-equiv?.

Will