Jump to content

  • Log In with Google      Sign In   
  • Create Account


OOP is going down?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
16 replies to this topic

#1 D.Chhetri   Members   -  Reputation: 181

Like
0Likes
Like

Posted 20 January 2011 - 07:30 PM

So my professor of computer architecture just said something like this "It is very likely and probable that in the next few decade, OOP will be replaced by functional programming" the reason being is because of

architectural improvements and the future of computer architecture. Now he is a very smart man, and I didn't have the time to ask questions, but what do you guys think about this?

Edge cases will show your design flaws in your code!
Visit my site
Visit my FaceBook
Visit my github

Sponsor:

#2 Dan Mayor   Crossbones+   -  Reputation: 1712

Like
0Likes
Like

Posted 20 January 2011 - 07:36 PM

I for one do not believe that. Seems that most architectures are moving more and more into object oriented models. I would think that within the next few decades we may see functional programming fade from modern programming. We may also see an upraise in static and singleton object use which may feel a little more functional, however I can not see any benefit of functional programming over object oriented programming for any practical use.

Digivance Game Studios Founder:

Dan Mayor - Dan@Digivance.com
 www.Digivance.com


#3 Oberon_Command   Crossbones+   -  Reputation: 1781

Like
0Likes
Like

Posted 20 January 2011 - 07:43 PM

We may also see an upraise in static and singleton object use which may feel a little more functional, however I can not see any benefit of functional programming over object oriented programming for any practical use.



What do singleton objects have to do with functional programming? Are you sure you're not thinking of procedural programming?

Personally, I think functional programming will remain mostly in the academic world until some large corporation (probably several) pick it up.

#4 Palidine   Members   -  Reputation: 1268

Like
0Likes
Like

Posted 20 January 2011 - 07:53 PM

If I had to guess he was saying this because of the trend towards very high core counts in modern CPUs. Intel just announced at least a 16 core cpu and maybe something even more ridiculous? The advantage of functional programming is that, I think, many (all?) functions don't have side effects so they can be easily parallelized.

The obvious limiter to moving away from OOP is that we all super heart OOP because it's extremely intuitive. But, fundamentally it doesn't matter. You should know all kinds of programming anyway. And certainly if you hope to be employed after college, you'll need to know OOP :)

-me

#5 owl   Banned   -  Reputation: 364

Like
0Likes
Like

Posted 20 January 2011 - 08:04 PM

So my professor of computer architecture just said something like this "It is very likely and probable that in the next few decade, OOP will be replaced by functional programming" the reason being is because of

architectural improvements and the future of computer architecture. Now he is a very smart man, and I didn't have the time to ask questions, but what do you guys think about this?


I don't think that even makes sense anymore. Computer architecture? Isn't the compiler responsible for most of that work nowdays?
I like the Walrus best.

#6 Telastyn   Crossbones+   -  Reputation: 3712

Like
0Likes
Like

Posted 20 January 2011 - 08:35 PM

It is very unlikely that functional programming (in its current state) will ever catch on. As Paladine mentions, pure functional languages offer the advantage of being dead simple to parallelize.

There's two problems though with it gaining adoption:

1. Momentum. Very few programmers know functional programming now. Very few existing programs are functional now. The grand mass of business isn't going to change in a decade to anything; let along something that... different.

2. Weirdness. Speaking of which, the main reason functional programming will ever catch on is because it's hard for programmers to grok. People just don't think in the form of cascading functions and monadic transforms. Academics can usually manage it (which is why functional programming tends to be popular there). But your run of the mill app dev can barely understand Java, let alone something as demanding as Haskell. And they don't care about the parallelism benefits (because hardware is cheap/their apps aren't demanding) and they certainly don't care about the provability of programs.

#7 Drathis   Members   -  Reputation: 141

Like
0Likes
Like

Posted 20 January 2011 - 11:17 PM

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.

#8 Hodgman   Moderators   -  Reputation: 26967

Like
1Likes
Like

Posted 20 January 2011 - 11:31 PM

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.

#9 Jarwulf   Members   -  Reputation: 221

Like
0Likes
Like

Posted 20 January 2011 - 11:40 PM

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.

#10 Hodgman   Moderators   -  Reputation: 26967

Like
0Likes
Like

Posted 20 January 2011 - 11:44 PM

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...

#11 Jarwulf   Members   -  Reputation: 221

Like
0Likes
Like

Posted 20 January 2011 - 11:51 PM


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.

#12 iMalc   Crossbones+   -  Reputation: 2250

Like
0Likes
Like

Posted 21 January 2011 - 12:26 AM

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

#13 owl   Banned   -  Reputation: 364

Like
0Likes
Like

Posted 21 January 2011 - 02:43 AM

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.
I like the Walrus best.

#14 samoth   Crossbones+   -  Reputation: 4464

Like
0Likes
Like

Posted 21 January 2011 - 04:25 AM

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.

#15 Katie   Members   -  Reputation: 1243

Like
1Likes
Like

Posted 21 January 2011 - 04:28 AM

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.

#16 SimonForsman   Crossbones+   -  Reputation: 5715

Like
0Likes
Like

Posted 21 January 2011 - 08:20 AM

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++)
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!

#17 dantheman3633   Members   -  Reputation: 100

Like
0Likes
Like

Posted 21 January 2011 - 09:11 AM

Nope, OOP is not going down, it has too much momentum. It will just be supplemented with other programming models.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS