Immutable things.

Alaric B. Williams alaric@abwillms.demon.co.uk
Fri, 16 May 1997 20:27:12 +0000


> If you must have immutable things I encourage some function which
> makes an existing object immutable, possibly recursively through
> structures.
 
Why not the other way around - the default type is immutable, as you say,
but you can cast to mutable?

With linear logic, this would be a winner, since the returned value could only
be used once. If we turn it mutable and then stick it in a binding so it can
be read lots, that'd work, since the now-mutable object isn't expected to 
be immutable anywhere else. No copying needed.


ABW 
--
Alaric B. Williams (alaric@abwillms.demon.co.uk)

   ---<## OpenDOS FAQ ##>---

Plain HTML: http://www.delorie.com/opendos/faq/
            http://www.deltasoft.com/faq.html

Fancy HTML: http://www.deltasoft.com/faq0000.html