OOP is going down?

Started by
14 comments, last by dantheman3633 13 years, 3 months ago

'Jarwulf' said:

Machine->Assembly->C/C++->Managed languages. The trend in programming design is to make things easier. Your average joe programmer is not going to abandon simpler paradigms en masse to play amateur mathematician for some esoteric benefits. Maybe if it is somehow implemented as something the machine handles but I don't see most people wanting to deal with it directly.
"Managed languages" includes both the OO paradigm and the Functional paradigm (e.g. C# vs F#)… So, I don't get what you're saying…



I meant it from the POV of managed vs unmanaged.
Advertisement
Bah, screw functional languages, I'm still waiting for relational languages such as Prolog to go mainstream.
"In order to understand recursion, you must first understand recursion."
My website dedicated to sorting algorithms

Many of the reasons why OOP is falling out of fashion (at least in games/HPC) is because of it's ignorance of performance issues and difficulty to parallelise (extensions such as message passing systems / the actor model help with parallelism though)
See: Pitfalls of OOP

However, as shown in the above source, this isn't a death-blow to OOP, as the issues can be overcome. What we're going to is is the internals of OOP systems be completely reinvented over the next 10 years.

Same goes for functional programming languages, actually -- their internals will be re-written over the next decade to work even better on multi-core / NUMA computers.
I don't think that even makes sense anymore. Computer architecture? Isn't the compiler responsible for most of that work nowdays?
If you've written code that assumes that there's one CPU and one big bank of virtual RAM, then, there's no way that a compiler can magically make your code work on a machine where there's one CPU with a large bank of ram, with serveral co-CPUs each with their own private RAM.
i.e. architectural changes on the scale of NUMA require re-architecting of your code, not just recompiling with a new compiler.


blabla, paradigms are here to bring ease to us. Not to get us into the "god knows what" of electronic's whatsoever.
[size="2"]I like the Walrus best.
The world is not functional. The world does have state. In the world, actions do have side effects.

I therefore don't see how functional programming, which assumes the exact opposite, is very fit to model real world problems. It may be fit to solve some very specific problems, and admittedly, efficiently. However, it is no panacea, and I don't see how it must necessarily replace anything because it is so ultimately better. It is a thought model which has strengths and weaknesses, like every model.

One reason why OOP has been successful (and in my opinion will remain to be) is that it suitably models what the world and many (not all, but many) problems in it look like, in a way that an average human can easily grasp.
Yeah, 20 years ago at uni we were all told the same thing. Things like Haskell and ML would kill off C and C++ so there was very little point in learning them unless you wanted to be a systems programmer.

Five years before that OO was a fairly new idea but wouldn't gain any traction because declarative languages would take over -- the "Fifth generation" initiatives based around theorem engines.

Before that there was a brief phase where Forth was going to be the big thing which would save us all from imperative languages.

In the 70s it was LISP which would kill off the C/Fortran type languages. A number of computer companies were launched on the back of that prediction, but they all went bust.

Why would the other fade away and other become big? Why can't functional and OOP coexist? Scala has both ways and it's awesome. Also functional programming doesn't take the hard part out of parallelizing. If you don't know how to make thread safe code in OOP then I doubt you could make it as a functional programmer(or you need to study more :)). Threading issues come from accessing shared resources and operations that are dependent on each other. Functinal programming doesn't magically solve those.


The thing with pure functions (which is the only thing you're allowed to use in a pure functional language) is that there are no side effects, pure functions can always be executed in parallell unless they explicitly depend on eachother, in a pure functional language there is no such thing as shared resources or state and function interdependance is limited to the return values of the functions which makes it trivial for the VM/Compiler to parallelize the software automatically.

It doesn't magically solve the problem, it just rips away the tools used to create the problem and forces the programmer to do things differently. (This is why pure functional languages are "hard" to use)
(Most mainstream functional languages aren't pure though and does provide tools that allow the programmer to write imperative code)

Many modern c++ compilers allow you to mark functions as pure which allows the compiler to perform far more optimizations on them (__attribute__ ((pure)); for g++)
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
Nope, OOP is not going down, it has too much momentum. It will just be supplemented with other programming models.

This topic is closed to new replies.

Advertisement