For Loop and lazy(/batched) processing
Raphael Collet
raph at info.ucl.ac.be
Tue Jul 26 13:47:35 CEST 2005
Denys Duchier wrote:
>>Can you give us a precise definition of "yield" in Oz "for" loops, in
>>terms of Kernel language?
>
> There is a very precise definition of it in the ForLoop.oz expander ;-) and you
> can see any expansion in the OPI by asking for the "Core Syntax". It's quite
> technical but pretty straightforward nonetheless. Auxiliary functions are in
> RunTime.oz.
I just wanted to know whether Yield had the right semantics. Something
like: "Yield appends a value to the output, and waits for the next value
to be needed." And it has so.
>>I have some ideas on a better implementation of read-onlys, which would
>>partly solve your issue. We could remove the context switch that is
>>required to bind the read-only view of a variable.
>
> ??? I was talking about NewReadOnly and BindReadOnly from x-oz://boot/Value
> There is no context switch there, right?
BindReadOnly is at least as fast as variable unification, isn't it? And
ReadOnlys are not larger than SimpleVars in memory. Where is the issue
then? Do you want to avoid read-onlys "inside" the batches?
Cheers,
raph
More information about the mozart-hackers
mailing list