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

One of the stated goals of FP is that side effects should be eliminated

Message permanent page

— Different things

— See, you deny

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

Message permanent page

— They are completely different

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

— Https://

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