uniqueness and strictness unified?

rinus plasmeijer rinus@cs.kun.nl
Tue, 10 Mar 1998 00:16:29 +0200


>    For the purposes of uniqueness, IO and destructive updates, I
>    reasoned that it should not be a problem to have multiple
>    read-only references to the object, as long as there is at most
>    one destructive reference.

This is correct. In a limited way the type system already deals with this.
Under certain conditions (see the reference manual) one can have read access.
This read access must taken place before the destructive write access takes place.
Since Clean is a lazy language, the read access sometimes has to be forced (eg by using a strict let construct).

Greetings,

Rinus