[Haskell-cafe] idea for avoiding temporaries

David Roundy droundy at darcs.net
Thu Mar 8 17:18:47 EST 2007


On Thu, Mar 08, 2007 at 11:09:35PM +0100, Matthias Neubauer wrote:
> David Roundy <droundy at darcs.net> writes:
> > I see.  But how would one manage these handles? What's to keep me from
> > accidentally copying a handle? It sounds like it'd require explicit memory
> > management, in order to avoid ever copying a handle, if I were to implment
> > this myself.
> 
> Because you seem to write imperative code anyways: can't you simply
> use a specialized state monad with the array(s) hidden inside the
> monad as monad state?

No, the point is to avoid writing imperative code.  My examples used
imperative code, but that would be wrapped at the lowest level of the array
library, and all the real code would be pure.
-- 
David Roundy
Department of Physics
Oregon State University


More information about the Haskell-Cafe mailing list