4 ms·
This can be tricky, because programming based on events tends to push you into writing everything as event-handlers, but they get awkward for long-running state
by cmacleod4 7y ago
This can be tricky, because programming based on events tends to push you into writing everything as event-handlers, but they get awkward for long-running stateful computations. However Tcl has had coroutines for about 10 years now, and those allow you to bypass this problem completely.
I gave short presentation about applying this approach to scripts combining a responsive GUI with managing multiple parallel Expect sessions at www.eurotcl.eu/program.html#Macleod .