Wed Aug 19 12:41:45 EDT 2020

A language that does this automatically?

So with all this talk about event stuff and the realization that
events need to be done explicitly in a low level C setting, is it
possible to write a language that does all these conditional
transformations automatically?

This is probably a well-established insight in literature.

It would be nice to express that as an actual derivative on program
text.  I.e. replace condition evaluation with condition evaluation +
conditional scheduling of wakeup.

EDIT: That reminds me of

Maybe time to summarize the ideas there.