I like the idea of devising a cleaner set of primitives, but you need
to make it clearer in your argumentation that currently ByNeed bundles
two things: the "on demand" aspect and the "safe abstraction" aspect
(aka futures). The non-confluence comes entirely from the latter and
its behaviour with respect to unification.
Then what you are doing becomes clearer: you unbundle and make
available the pure "on demand" aspect. This allows you to rewrite the
example program: on the one hand your abstractions are now unsafe, but
on the other hand confluence is preserved.
I'd like to hear more about the implementation. I imagine that:
proc {ByNeed P X}
thread {WaitNeed X} {P X} end
end
is the specification and not the actual implementation, or is it?
Cheers,
-- Dr. Denys Duchier Équipe Calligramme LORIA, Nancy, FRANCE - Please send submissions to hackers@mozart-oz.org and administriva mail to hackers-request@mozart-oz.org. The Mozart Oz web site is at http://www.mozart-oz.org/.