Message from JavaScript discussions
January 2019
— Try
One of the stated goals of FP is that side effects between different parts of a program should be eliminated because they are inherently harmful
Wrong, nobody wants to eliminate side effects, they should just be controlled
— Yes
— Yes
— Eliminating side effects can make it easier to understand and predict
Yes
One of the stated goals of FP is that side effects should be eliminated
No
— Different things
— 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.
— This is basically how V8 runs GeneratorFunctions