I agree with you. I came up with the following example that shows that completing the effects of an event immediately is desired.
```
event none e;
var int v = 0;
par/and do
loop do // a simple loop that
await e; // when 'e' occurs
_printf("%d\n", v); // prints value of 'v'
end
with
v = v + 1;
emit e; // other trail prints '1'
v = v + 1;
emit e; // other trail prints '2'
end
escape v;
```
With the semantics of Céu, this prints '1' '2'. While with the semantics I proposed this would print '2' '2' which is not what you would intuitively expect.
A minor note is that the programmer needs to be aware that trails can not only halt on "await" but also on "emit". But I guess this is something that can be taught.
Op maandag 17 juni 2019 17:51:51 UTC+2 schreef Francisco Sant'Anna: