Mutation

Henry G. Baker hbaker@netcom.com
Thu, 15 May 1997 06:53:49 -0700 (PDT)


> HB> 'Freezing' a mutable array is impossible, in general, because the
> HB> freezing function doesn't know how many other pointers there are to
> HB> this object.  If the array is linear, however, it carries with it a
> HB> proof of the nonexistence of other pointers, and it is therefore OK to
> HB> freeze the array.
> 
> In this case we know that there are no other references to this array
> since we have just created it inside our (make-array) and haven't told
> anyone about it yet, or do you mean something else?
> 
> Brian

'We' know, but 'we' have to convince the GC.  Linear types or
refcount==1 are the only ways I can think of off the top of my head to
convince the GC.  

-- 
Henry Baker
www/ftp directory URL:
ftp://ftp.netcom.com/pub/hb/hbaker/home.html