4 ms·
so comprehensive! i wouldn't mind a tl;dr ;?j
by handler 14y ago
so comprehensive!
i wouldn't mind a tl;dr ;?j
- kilovoltaire 14y agoperhaps the easiest tl;dr is to try: http://syzygy.st/javascript-coroutines/#demo http://syzygy.st/javascript-coroutines/#demo but as for an explanation: it turns out coroutines let you "invert" memory/variable state into control/flow state!
- deleted 14y ago[deleted]
- bonobo 14y agoNice explanation, thank you. I was indeed wondering if having something like a statefull procedure (if I can call it this way, this is a fairly new concept to me) wouldn't make the code more complex; I didn't actually notice that the state is already there, it was just moved to another place.
- politician 14y agoCoroutines are functions with bookmarks to remind them where they last left off. A bookmarked infinite loop permits a concise implementation of things like event processing loops.