Node:SRFI-17, Next:SRFI-19, Previous:SRFI-16, Up:SRFI Support
This is an implementation of SRFI-17: Generalized set!
It exports the Guile procedure make-procedure-with-setter
under
the SRFI name getter-with-setter
and exports the standard
procedures car
, cdr
, ..., cdddr
,
string-ref
and vector-ref
as procedures with setters, as
required by the SRFI.
SRFI-17 was heavily criticized during its discussion period but it was
finalized anyway. One issue was its concept of globally associating
setter properties with (procedure) values, which is non-Schemy.
For this reason, this implementation chooses not to provide a way to set
the setter of a procedure. In fact, (set! (setter proc)
setter)
signals an error. The only way to attach a setter to a
procedure is to create a new object (a procedure with setter) via
the getter-with-setter
procedure. This procedure is also
specified in the SRFI. Using it avoids the described problems.