Question

I hear very often that the object-oriented programming paradigm is the most widespread. But are there any scientific statistics about how often other programming paradigms like procedural programming are used today?

I searched at gartner, but didn't found anything.

Was it helpful?

Solution

I don't think such statistics exists, and if they are, they may not be particularly relevant.

Take C# code base:

  • C# is an object-oriented language, but it is not unusual to see code bases full of procedural code written by programmers who has no understanding of object-oriented programming (or understand it as "OOP is when you put the code in methods within classes").

    How would you measure the proceduraliness of the code base? How can you tell that the code base is 64.2% procedural and 35.8% object-oriented?

    Assuming you just want to tell whether the code base is either object-oriented or procedural. Agreed, you will be able to do that for some code bases (the ones which are obviously missing any OOP or the ones which use object-orientation very well), but in many cases, the answer won't be that straightforward.

  • C# also has many functional paradigms, making it sometimes particularly elegant when working with collections.

    This being said, C# is not a functional language, and writing purely functional code for a large application won't be possible, not counting the fact that many functional paradigms don't exist in C#.

    This makes it even harder to measure. You can't just say: "This code base is functional." or "This code base is object-oriented." for code bases which use functional paradigms only when working with collections. So we are back to 64.2/35.8% problem described above.

If you're interested in the popularity of paradigms, what you may search instead is the penetration of some paradigms in languages and communities which weren't using them before. For example, ten years ago, C# didn't have any functional paradigms, and programmers who were using exclusively C# were most unaware of what a functional language is. Today, things are radically different.

This is also statistically measurable. You may measure that in 2004, 21.7% of programmers of a given community knew what functional language is, while in 2014, 41.2% know that, or that in 2004, 6% of programming languages had a specific paradigm, while ten years later, 9% had it.

Licensed under: CC-BY-SA with attribution
scroll top