Timeline for Functional Programming vs. OOP
Current License: CC BY-SA 3.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 5, 2017 at 9:38 | comment | added | Dai | Your functional example makes use of parameter pattern-matching. That isn't exclusive to functional programming, similarly functional programs can use monads and even imperative-like constructs without necessarily needing to formulate every iterative algorithm as a recursive algorithm. | |
| May 1, 2016 at 18:33 | comment | added | sara | I think it's also worth noting that the main difference isn't that you write the same program but you make your loops tail-recursive method calls. it's way larger than that | |
| S Feb 19, 2014 at 15:49 | history | suggested | Magus | CC BY-SA 3.0 |
Fixed minor grammar issues
|
| Feb 19, 2014 at 15:41 | review | Suggested edits | |||
| S Feb 19, 2014 at 15:49 | |||||
| Nov 28, 2010 at 20:25 | history | edited | Robert Harvey | CC BY-SA 2.5 |
added 2 characters in body
|
| Nov 1, 2010 at 15:05 | comment | added | CodexArcanum | Interestingly, you can model data-as-control and control-as-data as well to intermix. FP can use Arrows and first order functions to pass control flow around and manipulate it like data. OOP uses various design patterns to use objects for altering control flow. | |
| Oct 6, 2010 at 10:19 | comment | added | Lie Ryan | +1 for describing the most important aspect of imperative vs. functional: control flow vs data flow. One thing I have to add is that functional paradigm and OO paradigm is not mutually exclusive; you can use OO paradigm to model how object (data) interacts, and functional paradigm to transform (manipulate) that object. | |
| Oct 5, 2010 at 22:36 | comment | added | alternative | You should mention that the functional version is tail-recursive and thus optimized to avoid stack overflows. (Some people might see the recursion and think that functional programming is bad because of it) | |
| Oct 5, 2010 at 21:34 | history | edited | Jonas | CC BY-SA 2.5 |
added 6 characters in body; added 68 characters in body
|
| Oct 5, 2010 at 21:19 | history | answered | Jonas | CC BY-SA 2.5 |