3 ms·
Yeah async is difficult to reason about. I found a solution with generators in my custom programming language to keep the flow sequential (especially for UI).
by mabynogy 8y ago
Yeah async is difficult to reason about. I found a solution with generators in my custom programming language to keep the flow sequential (especially for UI).
An example of two ok/cancel buttons followed by some sleep (with generators too): http://dailyprog.org/~mabynogy/test/ http://dailyprog.org/~mabynogy/test/
source code (in my coffescript-like language): https://p.sicp.me/irDrC.js https://p.sicp.me/irDrC.js
generated output: https://p.sicp.me/fu6CW.js https://p.sicp.me/fu6CW.js