[plt-scheme] Native code generation and immutable pairs

From: Gregory Woodhouse (gregory.woodhouse at sbcglobal.net)
Date: Sun Feb 12 00:38:29 EST 2006

On Feb 11, 2006, at 9:01 PM, Robby Findler wrote:

>
> My sense is that we occasionally need mutation, but we get a lot by
> giving it up (and there's always mutable pairs and mutable records via
> define-struct in some variation that's not going away). But, I'm just
> speaking for myself.
>
> Robby

Would it be possible to make the car of an immutable pair a box, and  
do something like

(set-box! (car p) v)

(To tell you the truth, I've really been puzzling over how an  
application programmer might use boxes, but I've implicitly assumed  
that pairs are mutable.)

===
Gregory Woodhouse
gregory.woodhouse at sbcglobal.net

"Perfection is achieved, not when there is nothing more to add, but  
when there is nothing left to take away."
-- Antoine de Saint-Exupery




Posted on the users mailing list.