[cap-talk] Capabilities for immutable data

David Barbour dmbarbour at gmail.com
Wed Apr 13 16:12:14 PDT 2011


On Wed, Apr 13, 2011 at 2:25 PM, Sandro Magi <smagi at higherlogics.com> wrote:

> Values need not be transparent, and David considers mutable refs as
> found in ML also values, so they are not necessarily frozen.


Ah, I just reread this and noticed.

Values are immutable or 'frozen', Sandro. I just happen to distinguish the
'reference' from 'the thing that is referenced'.

Consider in a C-like language the difference between:
   int const* pN;
   int* const pM;

pN is a mutable pointer to an integer (which might also be mutable, though
you don't have the permission to mutate it).
pM is an immutable pointer to a mutable integer.

A 'reference' is similar to 'pM'. I.e. the references themselves are
immutable values, even if the objects they reference are mutable.

An ML reference is a value, but is not mutable. Rather, the storage cell
accessed via the reference's protocols is mutable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.eros-os.org/pipermail/cap-talk/attachments/20110413/ba4e7b24/attachment.html 


More information about the cap-talk mailing list