|
|
|
|
|
by dahfizz
1544 days ago
|
|
You're definitely stretching here. I could just as easily argue that "all of main memory" is the output of any function. Therefore every function is a pure function, and C is a function language. Using your definition, the concept of functional programming is meaningless. Main memory is state. Registers and cache are state. The entire purpose of the CPU is to mutate state. |
|
He's not really stretching the definition, that's just the lens through which FP looks at the world.
Of course there is state. FP doesn't prohibit state, it just makes it explicit and referentially transparent. But this is in the semantics, not the execution model of the program.