views:

506

answers:

9

Today we can look back on the evolution of computer science and see structural programming, functional programming, and finally object-oriented programming. Additionally, things like meta-programming (reflective programming) and combining approaches into a single language (e.g. LINQ) are current.

Another trend is template-meta-programming (though implemented in C++ long ago) and the advent of dynamic languages (ruby, python).

What do you think:

  • Will OOP be replaced by some new programming paradigm?
  • What problems does OOP have that new paradigms will need to address?
+5  A: 

OOP is not going to be replaced, but will be built upon and used as the basis for the next evolution in programming.

Chris Ballance
+1  A: 

Aspect Oriented Programming (AOP) is one relatively new paradigm that comes to mind which is already seeing significant use in the field through various inversion of control (IoC) containers and the dependency injection pattern. As Chris Ballance said, it builds on the existing OOP way of doing things.

Scott A. Lawrence
Advocates have been banging on about AOP for 5 years now and it's not gaining any traction. It's another one of those clever ideas that doesn't work in the real world.
Martin Spamer
@Martin Spamer - We've used it in production systems I've worked on going back to 2006--and that's just on the .NET side. The techniques are use to a larger degree than you assert.
Scott A. Lawrence
+3  A: 

But structural and functional programming are still here; OOP didn't replace them, it just added another tool to the toolbox.

Take AOP for example; it's definitely post-OOP, but fits on top of or beside what's come before.

Dean J
+4  A: 

It appears that we are not moving into wild new ideas totally foreign to our previous experiences with software engineering, but rather are starting to integrate ideas from Functional (and possibly structural though no immediate things come to mind) into out OOP Paradigm to make more readable, and ultimately more extensible designs.

Matthew Vines
+5  A: 

I think we will see continued proliferation of Domain Specific Languages and declarative languages tied to specific applications.

DSO
We already have this. It seem to be new. It seems like business as usual.
S.Lott
I think this also points in the direction of reusable domain object-models as proposed in (Fowler) Analysis Patterns. DSL does not seem like business as usual to me.
Johannes Rudolph
+2  A: 

I could see a framework with a massively unified object model being one of the next big leaps.

Allowing one object to interact with any other object using natural language verbs, essentially giving one the benefits of OO, dynamic languages, and scripting languages.

I'd see the framework having some logic behind how, and in what order verbs are applied, and having verb-to-verb dependencies. For example, say that you had a "car" object, if you wanted to "drive" the "car" there would be a dependency that the "car" would be started, so "start" would get called automatically.

Programmers could then write

A Car has a steering wheel, 4 wheels, a number of doors, and a motor.

The framework would then infer that a Car has 4 tires, some structure to hold a number of doors, and since the car has a motor that it has some form of locomotion, and on/off state, etc.

Obviously, this idea is very poorly developed here, but I could see something like that lowering the barrier of entry to programming allowing a more diverse set of ideas to come through. The language/framework/whatever would need to have power "under the hood" to be really effective though.

jessecurry
+1  A: 

I'd say the general trend is for object-oriented languages to borrow more from functional languages with a better approach to concurrency and less emphasis on type safety.

Expect to see more from multi-methods; these are methods that are only called when the parameters of certain types are in a certain form i.e. a method isn't a member of a single class but a member of composite of object. I say objects and not classes because I hope we'll be doing prototype-based OO instead of class-based OO in the future too. Also I think there'll be less data hiding (private/protected).

Will OOP be replaced by some new programming paradigm?

OO is — or at least, it should be — about breaking down code into conceptual units that people can understand. That's always going to be valuable. How much we value it is the subject of fashion: there is more to programming than modeling code into something nice for humans. But, I think as computers get faster we'll start to value that even more. Even if OO has taken a bit of a hit recently because Java is starting to decline.

What problems does OOP have that new paradigms will need to address?

If you define OO as I did OO doesn't really have any problem other than maybe being less performant. It's how OO is done.

Ollie Saunders
A: 

Programming will be totally drag and drop. The best develpers of the future will be those who had a Lego set at 2 years old. OOP is not easy to learn, read, write or maintain. The costs of maintaining OOP code will eventually kill it off. The corporate world always embraces the latest fad, then outs that fad in favor of the next fad.

I see languages such as PHP and Ruby moving the industry in that direction. Simplify, reduce cost or die.

roberto
The main reason I use OOP is to write maintable, understandable code.
Wallacoloo
Actually, almost everything in this response is not true. PHP and Ruby both support OOP (http://en.wikipedia.org/wiki/List_of_object-oriented_programming_languages). The corporate world uses whatever it can to get the job done.
Wallacoloo
+1  A: 

Experiences seem to be confirming there is no single programming language or paradigm which is best for all problems and applications.

I expect that the evolution will go to extending multi-paradigm programming languages, but also the whole environments. For example, C++ is a multi-paradigm programming language. F# is also a classified into that group. However, F# as an integrated part of .NET can share types and objects between other languages being citizens of .NET. This is an interesting feature which make .NET languages collaborating very closely and making the whole environment something I'd call an inter-multi-paradigm programming environment or even an inter-language (all of them run on CLR).

Regarding functional and meta-programming, there is an interesting approach that suggests C++ meta-programming is nothing else than functional programming: What Does Haskell Have to Do with C++? (video)

mloskot