Re: [TYPES] Purely functional programming with reference cells

Francois Pottier <[email protected]>
Newsgroups gmane.comp.science.types
Message-ID <[email protected]>
[ The Types Forum, http://lists.seas.upenn.edu/mailman/listinfo/types-list ]


Hello,

On Wed, Nov 05, 2014 at 05:55:59AM -0500, Eduardo León wrote:
> I think this gives us a beautiful account of reference cells, one that does
> not force us to call them "non-functional features": Every time we update a
> reference cell, we are asserting that the old and new values are
> equal. [...]  Furthermore, this also subsumes laziness as a special
> case.

Just a little remark. I am not sure what you mean by "this subsumes laziness".
In fact, it seems that if you want to implement "laziness" (that is, thunks)
using reference cells, then you need to be able to write a value into a
previously empty cell. So, you need to relax your condition and allow the new
value to be "more defined" (in some sense) than the old value.

More generally, I think you might be interested by the paper "LVars:
Lattice-based Data Structures for Deterministic Parallelism", by
Lindsey Kuper and Ryan R. Newton.

Best regards,

-- 
François Pottier
[email protected]
http://gallium.inria.fr/~fpottier/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.