[Haskell-cafe] idea for avoiding temporaries

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Thu Mar 8 14:50:51 EST 2007


On Mar 8, 2007, at 14:21 , David Roundy wrote:

> I'm thinking you're missing the point.  The point is to copy without
> writing, and that requires some knowledge (whether static or  
> runtime) of
> whether anyone else has a reference to my data--which copy-on-write  
> won't
> give me.

Actually, I was thinking this sounded a lot like DiffArrays.  You  
don't actually get a guarantee that anything else isn't holding a  
reference, but you do get destructive update with any old references  
being quietly changed to diffs against the head.

-- 
brandon s. allbery    [linux,solaris,freebsd,perl]     allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH





More information about the Haskell-Cafe mailing list