[r6rs-discuss] [Formal] Requirement to detect circular lists -
schlie at comcast.net
Wed Oct 4 19:08:23 EDT 2006
William D Clinger wrote:
> That trick is one of the reasons set-car! and set-cdr!
> are not part of the (r6rs) library. Programs should
> not have to pay for mutable pairs unless they use them.
> The higher-order procedures can't use the above trick,
> however, because the draft R6RS says they must raise
> an exception for things like ...
or of course alternatively, R6RS may drop the requirement
that certain functions be restricted to utilizing proper
lists; thereby enabling set-car! and set-cdr! to be brought
back into the baseline scheme standard without incurring
the overhead otherwise implied;
and instead define an optionally supported implementation
library enabling the declaration of arguments and objects as
being immutable (constant) and/or proper, and corresponding
alternative definition of functions such as set-xxx!, ... which
may then enforce and/or leverage this knowledge in conjunction
with a compiler as may be desired without otherwise unnecessarily
incompatibly modifying the language.
More information about the r6rs-discuss