3 ms·
You're conflating the term "side effect", in functional programming it only describes purity. That is all. [1] [1] http://en.wikipedia.org/wiki/Side_effect_(c
by munro 12y ago
You're conflating the term "side effect", in functional programming it only describes purity. That is all. [1]
[1] http://en.wikipedia.org/wiki/Side_effect_(computer_science) http://en.wikipedia.org/wiki/Side_effect_(computer_science)
- dllthomas 12y agoYou are going to have to point at something more specific than the article as a whole. At a skim, it seems to support my interpretation perfectly fine. It starts off: "In computer science, a function or expression is said to have a side effect if, in addition to returning a value, it also modifies some state or has an observable interaction with calling functions or the outside world." The increase in CPU temperature certainly an "observable interaction with [...] the outside world". Given that you are given no kinds of guarantees about the semantics of this interaction in any language I'm aware of, it would be poor engineering to rely on it, but that doesn't mean it doesn't happen or that it is not a side effect.