2 ms·
If you take pure functions, and "side effect free" mantra, and apply it to OOP you get a pretty good mix. For example, instead of saving a file to the file-syst
by z3t4 8y ago
If you take pure functions, and "side effect free" mantra, and apply it to OOP you get a pretty good mix. For example, instead of saving a file to the file-system, you save the file to a file-system. A class/prototype can only mutate it's own object. If possible - a function should only use it's parameters and internal variables, eg. not access global/module scope.