Mutation

Henry G. Baker hbaker@netcom.com
Tue, 13 May 1997 18:42:58 -0700 (PDT)


> consider the following situation :
> 
> i'm reading text into a buffer.  i'm going to want to compute based on the
> text, but i don't want to keep it.  thus, when processing a lot of files i 
> use a single buffer and write over it repeatedly to cut down on gratuitous
> consing.  
> 
> how would this be resolved in a functional object framework?

I'm not saying that there are _no_ mutable arrays.  I'm only
requesting that functional arrays be marked as such.  If you want to
utilize a mutable array for this application, then you should.

Now if you are willing to do a bit more work, you might for some
purposes utilize a _linear_/_unique_ type for the text buffer, but
that shouldn't be required for a generally usable Lisp.

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