3 ms·
The original author was smart in calling it programming philosophies as it avoids a lot of puristic discussion. As mentioned elsewhere: Pure functional program
by madsbuch 4y ago
The original author was smart in calling it programming philosophies as it avoids a lot of puristic discussion.
As mentioned elsewhere: Pure functional programming (as in lambda calculus and its friends) does not consider state. It consider expressions that need to be reduced – the user can on top of that build something that mimics state, which is entirely up the programmer.
However, I think the most productive way of assessing programming languages for real world software applications is by looking at state management, as it usually turns out to be the most complex part of that application.
- bluetomcat 4y agoThe so maligned "state" in FP resides in the call stack: f(g(h(x))) It's a mutable and invisible data structure that drives the execution of the program.
- naasking 4y agoIt's not mutable and it's not a stack in the model, that's just an implementation artifact used for efficiency. You could equally well allocate every function context on the heap.