[plt-scheme] Native code generation and immutable pairs

From: Robby Findler (robby at cs.uchicago.edu)
Date: Sun Feb 12 08:06:43 EST 2006

Yes. SML, for example, only has mutable boxes (they call them `ref's)  
and nothing else in the language is mutable. Maybe looking there will  
give you some insight.


On Feb 11, 2006, at 11:38 PM, Gregory Woodhouse wrote:

> 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.