15

OOP is often regarded as an effective strategy of managing complexity in software, as opposed to non-OOP procedural programming.

Have there been any studies testing this notion? Is it proven that OOP often helps manage complexity in large projects?

7
  • 4
    Despite very interesting, IMHO, measuring "complexity" and "effectiviness" of paradigms is a difficult and bias-prone endeavor. Every program is unique, every developer is unique, and it's hard to compare. Moreover, productivity depends on more than a paradigm but on the tools, ecosystem, learning material. An unbiased study should let entire student groups program the same requirements with either language and see the results. However, even they are likely to have prior knowledge making it biased. I don't know of any such studies.
    – dagnelies
    Commented Jul 15, 2014 at 10:15
  • Not studies, but some academic rant: en.wikipedia.org/wiki/Object-oriented_programming#Criticism
    – Den
    Commented Jul 15, 2014 at 11:45
  • 1
    This is a bit of a trick question because OOP as practiced in the industry tends to be highly imperative. So we've moved from procedures that touch globals to methods that modify objects that modify other objects that modify other objects; the side effects are somewhat more explicit but there's still a lot of action at a distance going on. On the other hand when you minimize side effects and make things immutable some would argue you're doing functional programming.
    – Doval
    Commented Jul 15, 2014 at 11:54
  • 2
    There's no way to genuinely measure it- it's a quantum effect where measuring it influences the result.
    – DeadMG
    Commented Jul 15, 2014 at 13:40
  • 1
    To make a comparison, one must have an alternative paradigm that is applicable to very large programming systems, constructed by programmers of ordinary skills (i.e. not by a team of experts or state-of-the-art academics). Large systems tend to involve networking, database, load-balancing and redundancy (i.e. unreliable machines), among other things. The latter list of issues dominate any debates one may have for programming language paradigms.
    – rwong
    Commented Jul 15, 2014 at 15:09

2 Answers 2

10

I am not aware of any study with quantifiable measurements. As others have mentioned in comments to your question, it is practically impossible to achieve that. However there somewhat philosophical papers which try to answer that.

My favorite paper on that topic is Out of the Tar Pit by Ben Moseley & Peter Marks. It reasons with various statements from respectable sources about complex system design to quite interesting results.

Out of the Tar Pit concludes that function programming is actually the best paradigm to support solutions they are proposing. Which makes sense, because in my experience, complex OOP systems become very close to procedural over time and procedural start to look like OOP (they don’t have a syntax and other attributes, but an execution flow might become quite similar). The real difference comes with different paradigm or by combining it with OOP. At the moment, such paradigm is functional programming which is finally becoming usable in common business applications by common programmers (still getting there).

5

Yeah there have been some studies. Here's one: http://www.csm.ornl.gov/~v8q/Homepage/Papers%20Old/spetep-%20printable.pdf

Basically it concludes that there's not a measurable difference between procedural code productivity and OO language productivity.... but the truth is, these types of questions are so context sensitive, no study is going to tell you what you should do in a given situation.

3
  • For a long time there were studies that showed that introducing desktop computers to an office environment did not lead to increased productivity.
    – user251748
    Commented Mar 20, 2017 at 16:36
  • @nocomprende do you have any reason to believe those studies made the wrong conclusion? A PC from 1989 used by the average office worker in 1989 is completely different from a modern machine used by a modern worker. Similarly, the application of object technology may or may not improve over time. Commented Mar 21, 2017 at 12:29
  • 1
    @JørgenFogh I guess I was agreeing with the statement that studies do not always show what seems to be common sense. Businesses would not have started using computers in offices if they made things worse. People would not have spent decades developing the OO approach if it did not help. Would they? Well, people can be wrong, but how do you prove it conclusively one way or the other? What it comes down to is: "Does this work for you?"
    – user251748
    Commented Mar 21, 2017 at 14:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.