Message from JavaScript discussions

December 2018

— So there is a safety guarantee the programmer needs to think about

— 

In the latter, the bubble out of the dispatcher is needed, while in the former it's not needed neccesarily

— Would be nice if spawn returned some sort of object imo

— Yeah I've been thinking about what it should return

— 

const proc = spawn f();
while (!proc.done);
return proc.value;


Could be the same as:
return f();

— A promise was my first idea

— The dispatcher can literally route/throw an error any way I want it to

— GeneratorFunction.prototype.throw is baller

— Promises are probably a bit too complex

— Promises force you to enter the event queue and stuff

— Well that or just a thenable

— Yes