There's a note on CLiki
(http://www.cliki.net/Proposed%20ANSI%20Revisions%20and%20Clarifications)
about EQUAL. Someone seems to want it to detect circularities,
because EQUALP is not specified not to have to do so.
Is this as mad as it seems? The implication seems basically to be
`EQUAL should do an occurs check', and I don't think that can be made
cheap. The actual solution must surely be to specify that EQUALP may
not terminate on circular structures.
--tim
In article <····························@posting.google.com>,
··········@tfeb.org (Tim Bradshaw) wrote:
> There's a note on CLiki
> (http://www.cliki.net/Proposed%20ANSI%20Revisions%20and%20Clarifications)
> about EQUAL. Someone seems to want it to detect circularities,
> because EQUALP is not specified not to have to do so.
>
> Is this as mad as it seems? The implication seems basically to be
> `EQUAL should do an occurs check', and I don't think that can be made
> cheap. The actual solution must surely be to specify that EQUALP may
> not terminate on circular structures.
I'm reading that note a different way. It's saying that
EQUAL should defined to terminate unless both X and Y
are circular. That falls out of the normal CAR/CDR
recursive definition. As long as either X or Y are not
circular, the recursion will halt.
I can't tell if the parenthetical comment has any
action implication, but there's certainly no occurs
check needed for EQUAL.
* Chris Riesbeck wrote:
> I'm reading that note a different way. It's saying that
> EQUAL should defined to terminate unless both X and Y
> are circular. That falls out of the normal CAR/CDR
> recursive definition. As long as either X or Y are not
> circular, the recursion will halt.
Oh, that reading would be OK. I should have read more carefully, sorry!