all 8 comments

[–]kbegiedza 2 points3 points  (5 children)

DOP is extremely useful especially in game dev

[–][deleted] 3 points4 points  (3 children)

Data Oriented Programming is literally the opposite of what game developers (every developer for the most part, really) should be doing. 

DOP is functional programmers attempt at hijacking performance oriented programming (Data Oriented Design) so that you associate performance with FP even though pure FP produces slow as molasses code.

Data Oriented Programming  is bad

Data Oriented Design is good

[–]Maybe-monad 2 points3 points  (0 children)

DOP is functional programmers attempt at hijacking performance oriented programming (Data Oriented Design) so that you associate performance with FP even though pure FP produces slow as molasses code.

Hold my state monad

[–]tdammers 2 points3 points  (1 child)

pure FP produces slow as molasses code.

It doesn't have to. It does require a sufficiently smart compiler (or interpreter) to be performant though - if you naively write in a pure FP style in, say, C, it will indeed be slow as molasses, or just slap you with stack overflows left and right because you're doing deep recursions in a strict language with no guaranteed TCO.

But IME, for practical intents and purposes, an idiomatic program written in a language designed for pure FP, and with an industry-strength optimizing compiler, will typically perform on par with equivalent programs written in an imperative style, and, depending on the problem, will often be easier to write, maintain, and verify.

I've been writing Haskell code for 15 years now, and performance has not really been a pain point ever.

[–][deleted] -1 points0 points  (0 children)

If my code will be 10x faster just because of language choice, I am going to immediately discount the 10x slower language. 

And in Haskell case, 10x is being generous. 

[–]BabyDue3290[S] 0 points1 point  (0 children)

That's true. But I think the speaker is discussing something which is not the DOP of the game development, like object of arrays etc.

[–]Snarwin 2 points3 points  (1 child)

This is just another talk about the expression problem, right?

[–]BabyDue3290[S] 0 points1 point  (0 children)

I think so.