[r6rs-discuss] [Formal] Requirement to detect circular lists - benchmarks

From: Paul Schlie <schlie>
Date: Wed Oct 4 19:08:55 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.
Received on Wed Oct 04 2006 - 19:08:23 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC