3 ms·
It's not about eliminating effects! It's about controlling them. A program that had no effect would be perfectly useless. In distributed systems, it's importan
by smilliken 7y ago
It's not about eliminating effects! It's about controlling them. A program that had no effect would be perfectly useless.
In distributed systems, it's important to be very intentional about effects, instead of letting them creep into any part of your program.
- pmiller2 7y agoSpecifically, it’s about controlling side effects by isolating them. That is, code with side effects has to explicitly declare that it has them, and calling any code with side effects allows the compiler to infer the calling code has side effects. Typically, the isolation mechanism is either explicitly monads, or, is equivalent to monads. This is incredibly useful for debugging, as is single assignment style code, although single assignment is not necessarily implied by “functional programming.”