Why OOP more popular than functional programming?

Started by
36 comments, last by MaulingMonkey 13 years, 7 months ago
+3

i normally never has a hirarchy deeper than one layer, if i ever have one.

and why stick to c if c++ allows you to code faster? (why in c++ if you could do in c# would be my punchline, others would use "in python" or what ever :))
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud

Advertisement
Quote:Original post by phresnel
Uh oh.


Indead. Looks like a repost of Mafioso's old thread: 'Is OOP better for developing games?'.

So Mafioso, after reviewing that old thread, what exactly is the stumbling point that you aren't quite capturing? Could you post a concrete example of what wasn't explained well in that thread?
I like OO simply because it makes variables easier to manage on large projects. That, and because you can modify class functions easier to accommodate unforeseen data requirements.

I certainly agree, however, that not everything function to be made a method.

Note: This is in reference to PHP programming. I'm not familiar with C#/C++.
Quote:Original post by KulSeran
Quote:Original post by phresnel
Uh oh.


Indead. Looks like a repost of Mafioso's old thread: 'Is OOP better for developing games?'.

So Mafioso, after reviewing that old thread, what exactly is the stumbling point that you aren't quite capturing? Could you post a concrete example of what wasn't explained well in that thread?


I readed that thread, but still can't understand why people making everything complicated with OOP, for me OOP is only many functions with a prefix and code splitted in many cpp's/headers it just makes x100 harder for me, every open project game that I downloaded (about 5) was made in OOP, seems functions doesn't exist at all, I'm not very good at english, maybe I'll try to reread and go into this deeper and sorry for reposting, I spend all day reading that thread [smile] and didn't get why every game is made with OOP, someone said that somewhere need functions somewhere OOP, but why every game is made with OOP? finally decided to learn what is more popular among programmers and I get to this question [smile] , one reason to learn OOP is for this pointer (I don't think it's worth)
There are certainly OO functional languages. OCaml and F# come to mind.
Quote:didn't get why every game is made with OOP


Large majority of developers in commodity software industry is <25 years old. Since their tenure will last around 3 years before they burn out from 16+ hour work days, there is no point in training them.

So companies use whatever methodology new hires come with. These days it's Java and design patterns.

It's also a known observation that very few programmers are capable of growing beyond the one and only paradigm they learned, so majority will never be capable of learning anything beyond OOP. Nobody ever investigated why this is so, but last 20 years of observation of industry confirms it.

This year alone over 1 million people will graduate and be certified in OOP. There will be almost no graduates who even heard about functional programming.

In short - race to bottom in commoditized markets. The rest is not a factor.
Quote:Original post by Antheus
Quote:didn't get why every game is made with OOP


Large majority of developers in commodity software industry is <25 years old. Since their tenure will last around 3 years before they burn out from 16+ hour work days, there is no point in training them.

So companies use whatever methodology new hires come with. These days it's Java and design patterns.

It's also a known observation that very few programmers are capable of growing beyond the one and only paradigm they learned, so majority will never be capable of learning anything beyond OOP. Nobody ever investigated why this is so, but last 20 years of observation of industry confirms it.

This year alone over 1 million people will graduate and be certified in OOP. There will be almost no graduates who even heard about functional programming.

In short - race to bottom in commoditized markets. The rest is not a factor.


+ for you man, I readed and asked and readed again, but in conclusion everything what you know is good, and there is nothing better or worst, every paradigm has this own pliuses and minuses, just need to know them all, if you want to know what is the best for your project.

P.S. Going to reread my old thread about OOP and note pliuses and minuses of paradigms and study them, Thanks for all your reply they helped me a lot [smile] And don't think that OOP is always the best way doing things [lol]
I think the long and the short of it is that OOP works just fine for making games, and is well established. Are other paradigms better in certain situations? Sure. Are they universally better? No. Are they better enough in the relevant problem domains that it's worth the trouble of worrying about when OOP resources are plentiful and reliable? The popular answer to that seems, again, to be no (and I would agree).
Quote:Original post by Shinkage
Are they better enough in the relevant problem domains that it's worth the trouble of worrying about when OOP resources are plentiful and reliable? The popular answer to that seems, again, to be no (and I would agree).


The fact its a popular answer is a bad thing; in the case of games the performance gains you can get from going from an text book OOP to something more functional (not pure functional as you'll have side effects of course) are generally more than worth the effort.

Unfortunately very few places invest in new things, fortunately some do and, in the case of games, no ways of thinking about things makes their products shine.

The best example; the move away from OOP back towards something just above assembly for SPU programming has suddenly unleashed a world of power which has been sitting there waiting to be unlocked for some time now.
Quote:Original post by Shinkage
Are other paradigms better in certain situations? Sure. Are they universally better? No.


Are you saying that OOP is universal?

This topic is closed to new replies.

Advertisement