3 ms·
The antithesis of FP is imperative. And OOP is imperative. Imperative programming encompasses both procedural and object oriented programming. Those are simp
by asdasf 13y ago
The antithesis of FP is imperative. And OOP is imperative. Imperative programming encompasses both procedural and object oriented programming. Those are simply two different ways to structure an imperative program.
- cygx 13y agoI'd hesitate to call imperative the antithesis of FP: It's imperative vs declarative - FP is on a different level of abstraction, as a sibling to, let's say, logic programming.
- asdasf 13y ago>It's imperative vs declarative Good point, I think the common tendency to refer to procedural programming as either procedural or imperative interchangeably got me doing the same thing with functional and declarative.
- bad_user 13y agoI'd hesitate to say that FP is on the same level as logic programming, or to say that it is declarative. It really depends on what you mean by FP. If you refer to lambda-calculus or to say, the head/tail decomposition so common in FP, then those are inherently sequential and not really declarative. If you refer to functors / monads, then you're on to something, but then again, OOP doesn't really imply imperative.