3 ms·
I appreciate your comment, but I think it's inaccurate to say that functional programming is suboptimal whenever you're dealing with stateful systems. For me,
by mbrock 13y ago
I appreciate your comment, but I think it's inaccurate to say that functional programming is suboptimal whenever you're dealing with stateful systems.
For me, the primary characteristic of functional programming is that it hems pretty closely to mathematics. And the fundamental language of mathematics is "pure." The calculus that underlies engineering is expressed in a pure language where time is simply a function parameter -- and this in itself doesn't mean that calculus is ill-suited for dynamic problems.
If you look at the Haskell world, for example, there is a ton of fascinating work being done with stateful systems, reactive systems, and so on. Functional programming doesn't exclude state and dynamicity. But it insists on modelling these things mathematically, that is, with a foundation of immutability, equational reasoning, etc.
See what I mean? I'm not saying that current implementations of functional languages are perfect in every scenario -- that's clearly false. But basically, or theoretically, functional programming is eminently capable of modelling state, and could even be argued to model it more coherently and intelligently than other paradigms.