[r6rs-discuss] [Formal] Requirement to detect circular lists
| From: William D Clinger <will_at_ccs.neu.edu>
| Date: Thu, 05 Oct 2006 14:02:22 -0400
|
| I am posting this as an individual member of the Scheme community.
| I am not speaking for the R6RS editors, and this message should not
| be confused with the editors' eventual formal response.
|
| Andre van Tonder wrote:
| > Thank you - I think I understand what you are getting at.
| > One possible problem I see with this implementation, though,
| > assuming the circular case where an exception must be raised,
| > is that whatever the relative sizes of the time quanta
| > assigned to the threads, one can exhibit a "proc" that uses
| > set-cdr! to grow the circular list in the thread "thread"
| > faster than the "exception-check" thread can catch up with it.
|
| Right. I should have said it works only when pairs are not
| mutable.
It works only when CDRs are not mutable. Mutable CARs have no effect.
Lumping SET-CAR! with SET-CDR! unnecessarily makes vector-like
operations on lists as expensive as list splicing.
Received on Fri Oct 06 2006 - 16:00:10 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:01 UTC