[r6rs-discuss] [Formal] Requirement to detect circular lists
agj at alum.mit.edu
Fri Oct 6 16:00:10 EDT 2006
| 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
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.
More information about the r6rs-discuss