3 ms·
>There are good reasons why OOP is more popular than FP beyond the vacuous "they simply don't get it" arguments. I think the main reason is simply historic. OO
by gizmo686 13y ago
>There are good reasons why OOP is more popular than FP beyond the vacuous "they simply don't get it" arguments.
I think the main reason is simply historic. OOP is a lot easier to implement (in terms of reasonable runtime efficiency) than FP. Because of this, it had a huge head start to get itself into common usage. FP has only recently gotten to the point where it is actually competative on performace.
In terms of 'getting it', computers and programing were originally the domain of people who were much more procient in math than now. I suspect many of them would have been more comftorable with FP, but implenting it was way beyond their time.
- seanmcdirmid 13y agoActually, FP is easier to implement given their simple semantics, it can even be implemented to go very fast for a very long time (e.g. Caml). But most OOP languages are imperative, which definitely maps to the machine more easily (note: OO is orthogonal to imperative even if they are often coupled). Object-oriented programming became popular when the number of programmers increased dramatically in the 80s/90s. Most of the high-end programmers do prefer FP, especially as they have the math background to appreciate it. But everyone else...objects have a usability advantage.
- stormbrew 13y ago> Most of the high-end programmers do prefer FP I'd really like to hear an argument for this that doesn't beg the question.
- seanmcdirmid 13y agoIt is anecdotal and probably a bit too strong! Many of the strong programming languages people I have met have been amazing programmers strongly in the "FP" category. If you look at a lot of the PL people that do dev work in Google, they belong to this category as well. I'm not in that world personally. I attended WGFP once and found people like Simon Peyton Jones to be crazy smart and able to work with through complex abstractions quickly to find very elegant solutions. But I just couldn't think like that, I'm more OO.
- Derbasti 13y agoWasn't FP invented long before OOP? All the early LISP stuff was technically FP (even though they did not call it that at the time). Wikipedia seems to say that OOP was invented in the AI labs at MIT. In the same LISP mentioned above. Interesting.
- seanmcdirmid 13y agoLISP was specified in '58, but was not implemented until '62; Simula was implemented in '63. So about the same time, give or take.