4 ms·
Right, his Fibonacci class is completely immutable, i.e. it's purely functional. He's confusing different usages of the word "state" - exhortations to avoid st
by antonvs 8y ago
Right, his Fibonacci class is completely immutable, i.e. it's purely functional.
He's confusing different usages of the word "state" - exhortations to avoid state are almost always about mutable state, but he doesn't appear to recognize that distinction.
- jarym 8y agoTell that to the person at work who recently came back from a FP workshop and has declared war on all state... Developers to tend to go from extremes.
- antonvs 8y agoThe question is what he means by "all state". If we take the OP post as definitional, then eliminating state means eliminating compound data structures, because that's the usage of "state" implied by that Fibonacci example. Hopefully the person at your work has something less extreme in mind. Ask him to explain what he means by "state".