[r6rs-discuss] Proposed features for small Scheme, part 1: a stake in the ground

John Cowan cowan at ccil.org
Sat Sep 12 16:21:01 EDT 2009


Andre van Tonder scripsit:

> I think set! is often a better abstraction for the kind of lightweight
> mutation I need.  It provides more easily verified static guarantees.  For
> example, a mutable object can escape from the procedure that creates
> it (for example by being returned, perhaps accidentally), whereas
> the mutability that comes with set! is strictly confined to the lexical
> scope of the binding that introduces the variable.

Interesting.  I have never seen that pointed out before, or indeed *any*
defense of set! over cells/boxes before.

-- 
They tried to pierce your heart                 John Cowan
with a Morgul-knife that remains in the         http://www.ccil.org/~cowan
wound.  If they had succeeded, you would
become a wraith under the domination of the Dark Lord.         --Gandalf



More information about the r6rs-discuss mailing list