[MLton] mutable fields [Re: [Smlnj-dev-list] Evolving SML]

Matthias Blume blume@tti-c.org
Tue, 25 Oct 2005 20:29:44 -0500


On Oct 25, 2005, at 4:18 PM, Peter Sestoft wrote:

> On Tue, 25 Oct 2005, John Reppy wrote:
>
>
>> Here are a few ideas for short-term (and medium-term) features that
>> I'd like to see:
>>
>
>
>>     7. records with mutable fields.
>>
>
> Preferably this should be syntactic sugar for a records with ref
> fields.  OCaml-style updatable records, while useful, would require a
> redesign of equality because updates can create cycles...

Well, it does not have to be syntactic sugar as you say, i.e.,
there might not be a way of grabbing the ref cell out of the record
without dereferencing it.  Of course, equality on records
that have at least one mutable field would have to be pointer
equality.

Matthias