Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: cyclic value construction ("let rec")
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Markus Mottl <mottl@m...>
Subject: Re: cyclic value construction ("let rec")
> This certainly suggests to allow the export of an immutable view of a
> record type with mutable fields. This way you could do the
> initialization in a safe way (no magic) using side effects, and still
> export a safe immutable type to the external world.

Sounds like a good idea! Using powerful "magic" is probably too dangerous
for "everyday"-use and definitely not in accordance with the "zero defect"
ambitions of the type system...

Although it would sometimes be nice to even hide specific fields of the
record, this would probably not work well together with separate
compilation.  However, the memory layout of the fields does not change by
just omitting the "mutable" declaration, so this should not do any harm.

Best regards,
Markus Mottl

-- 
Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl