• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Concentrate

OOP is going down?

15 posts in this topic

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?
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
[quote][color="#CCCCCC"][size="2"] 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. [/quote][/size][/color]
[color="#CCCCCC"] [/color]
[color="#CCCCCC"][size="2"]What do singleton objects have to do with functional programming? Are you sure you're not thinking of [url="http://en.wikipedia.org/wiki/Procedural_programming"]procedural programming[/url]?[/size][/color]
[color="#CCCCCC"] [/color]
[color="#CCCCCC"][size="2"]Personally, I think functional programming will remain mostly in the academic world until some large corporation (probably several) pick it up. [/size][/color]
0

Share this post


Link to post
Share on other sites
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
0

Share this post


Link to post
Share on other sites
[quote name='Concentrate' timestamp='1295573434' post='4762169']
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?

[/quote]

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

Share this post


Link to post
Share on other sites
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 [i]Java[/i], 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 [i]certainly[/i] don't care about the provability of programs.
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
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 ([i]extensions such as message passing systems / the actor model help with parallelism though[/i])
See: [url="http://research.scee.net/files/presentations/gcapaustralia09/Pitfalls_of_Object_Oriented_Programming_GCAP_09.pdf"]Pitfalls of OOP[/url]

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 [i]internals [/i]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 [i]even better[/i] on multi-core / NUMA computers.
[quote]I don't think that even makes sense anymore. Computer architecture? Isn't the compiler responsible for most of that work nowdays?[/quote]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.
1

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
[quote name='Jarwulf' timestamp='1295588407' post='4762244']
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.
[/quote]"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...
0

Share this post


Link to post
Share on other sites
[quote name='Hodgman' timestamp='1295588658' post='4762246']
[quote name='Jarwulf' timestamp='1295588407' post='4762244']
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.
[/quote]"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...
[/quote]


I meant it from the POV of managed vs unmanaged.
0

Share this post


Link to post
Share on other sites
Bah, screw functional languages, I'm still waiting for [b]relational [/b]languages such as Prolog to go mainstream.
0

Share this post


Link to post
Share on other sites
[quote name='Hodgman' timestamp='1295587862' post='4762239']
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 ([i]extensions such as message passing systems / the actor model help with parallelism though[/i])
See: [url="http://research.scee.net/files/presentations/gcapaustralia09/Pitfalls_of_Object_Oriented_Programming_GCAP_09.pdf"]Pitfalls of OOP[/url]

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 [i]internals [/i]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 [i]even better[/i] on multi-core / NUMA computers.
[quote]I don't think that even makes sense anymore. Computer architecture? Isn't the compiler responsible for most of that work nowdays?[/quote]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.
[/quote]

blabla, paradigms are here to bring ease to us. Not to get us into the "god knows what" of electronic's whatsoever.
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
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.
1

Share this post


Link to post
Share on other sites
[quote name='Drathis' timestamp='1295587069' post='4762234']
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.
[/quote]

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

Share this post


Link to post
Share on other sites
Nope, OOP is not going down, it has too much momentum. It will just be supplemented with other programming models.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0