Strange interaction between futures and failed futures

Denys Duchier Denys.Duchier at ps.uni-sb.de
Thu Jun 28 11:28:14 CEST 2001


raph at info.ucl.ac.be (Raphael Collet) writes:

> 	proc {MakeReadOnly X F}
> 	   {ByNeed fun {$} {Wait X} X end F}
> 	   thread {Value.waitQuiet X} {Wait F} end     % (1)
> 	end

As I said, we already had this discussion before and I gave in message
<news:iselz4qjpc.fsf at elk.ps.uni-sb.de> the following quasy-correct
construction for Mozart's !!:

	declare
	proc {MakeFut V F}
	   thread {Value.waitQuiet V} {Wait F} end
	   {Value.byNeed fun {$} {Value.waitQuiet V} V end F}
	end

> > (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.
> 
> So what?  Requesting F causes {Wait X}, which requests X.  This is
> reasonable, IMHO.

We can argue whether it's a more/less desirable semantics.  My point
is that it is a _different_ semantics (not a conservative change).

> In summary, we have FOUR variants of a future, depending on whether
>  - its guard disappears eagerly (1)
>  - it propagates requests (2)

We might indeed.  However it seems to me that having the choice of (1)
is not very interesting.  In fact, does it make sense when the future
does _not_ propagate requests?  How would the future ever be erased in
the latter case?

Personally, I find it aesthetically pleasing to be able to distinguish
the capability to request (as Peter suggested a long time ago) but it
is not clear to me that it is useful.  Perhaps, as Raphael suggests
above, it is reasonable to have the requesting kind of semantics.  Is
there any practical value in having the non-requesting kind?

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