3 ms·
Yes, I think the great lesson we can take from functional programming is not of being functional 100% of the time, but of not having mutable global state. Your
by greiskul 15y ago
Yes, I think the great lesson we can take from functional programming is not of being functional 100% of the time, but of not having mutable global state. Your inner loops, local variables, etc. can all be mutable and nobody will care, as long as your interface is functional.
- fpgeek 15y agoYes and no. It is true that what matters most of the time is a functional interface, not how that is achieved. That being said, it is much harder to successfully implement a functional interface if you are using side-effects willy-nilly inside.