Message from JavaScript discussions

January 2019

— See, you deny

— 

One advocates for complete removal of side effects, the other says eliminating useless side-effects when possible is beneficial

— They are completely different

— It's like:
You can not own a gun
Vs:
It might be unsafe to own a gun

— Https://en.wikipedia.org/wiki/Protothread

Within a protothread, yielding is accomplished by utilizing Duff's device within a thread's function and an external variable used in within the switch statement. This allows jumping (resuming) from a yield upon another function call.

Message permanent page

— This is basically how V8 runs GeneratorFunctions

— The description matches it very closely

— Tom Duff made a statement which is in there, but I solved that problem :)

— 

 it’s not possible using this method to have coroutines give up control anywhere but in their top-level routine

Message permanent page

— Hz protothreads can give up control from any level because all levels are the top level

— Thanks Dani :)

— 😄👍