Strange interaction between futures and failed futures

Denys Duchier Denys.Duchier at ps.uni-sb.de
Wed Jun 27 13:46:27 CEST 2001


pvr at info.ucl.ac.be (Peter Van Roy) writes:

> Here's a fix at the language level.
> It suffices to define '!!' as follows:
> 
>    fun {MakeReadOnly X}
>       {ByNeed fun {$} {Wait X} X end}
>    end
> 
> Then do Leif's example:
> 
>    local X in
>       _ = {MakeReadOnly X}
>       X = {Value.byNeedFail x}
>    end

This is not at all the same semantics.
(1) the read-only guard doesn't disappear when X becomes bound
(2) It is not read-only.  Consider:

        declare X F = {MakeReadOnly X}
        X = {ByNeed fun {$} {Show a} foo end}

Now {Wait F} actually requests X.

Cheers,

-- 
Dr. Denys Duchier			Denys.Duchier at ps.uni-sb.de
Forschungsbereich Programmiersysteme	(Programming Systems Lab)
Universitaet des Saarlandes, Geb. 45	http://www.ps.uni-sb.de/~duchier
Postfach 15 11 50			Phone: +49 681 302 5618
66041 Saarbruecken, Germany		Fax:   +49 681 302 5615
-
Please send submissions to hackers at mozart-oz.org
and administriva mail to hackers-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.





More information about the mozart-hackers mailing list