
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. David On Thu, Mar 08, 2007 at 11:15:25AM -0800, Dan Weston wrote:
Or possibly more generally copy-on-write, which requires one more level of indirection (handle instead of ptr). Since you are talking about using ForeignPtr, this is already within your power to prototype, I should think.
Dan
Dan Piponi wrote:
On 3/8/07, David Roundy
wrote: I started wondering whether there's a solution that would allow us to write pretty high-level pure functional code, while the RTS can realize at run-time that we have the only reference to the input argument and that it is therefore safe to consume it destructively.
I think you're talking about uniqueness typing which is supported by the programming language Clean.