[plt-scheme] Native code generation and immutable pairs

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

define-struct creates a new record type. I'm not sure how the  
implementation would help you understand it, but I suppose it is in  
plt/src/mzscheme/src somewhere. The manual is probably the best place  
to start.

Robby

On Feb 11, 2006, at 11:47 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.
>
> How is define-struct implmented internally? Where would I look?
>
> Right off the top of my head, the only real options I can think of  
> are as a pair or as a closure.  Defining structures as  closures  
> seems slick, but I have no feel for how practical it might be.  
> Internally, it seems to me that a closure is likely to end up being  
> something like a hash table associated with an expression, so it  
> would probably as efficient to work with as anything. Hmm...
>
> ===
> Gregory Woodhouse
> gregory.woodhouse at sbcglobal.net
>
> "Good acts are like good poems. One may easily get their drift, but  
> they are not rationally understood."
> --Albert Einstein
>
>
>
>



Posted on the users mailing list.