Live data from Hacker News

OOP Is Dead, Long Live OOP

gamedev.net

11–20 of 357 posts

Re: OOP Is Dead, Long Live OOP

#11

Author needs to actually state what ECS is. From context I don't think he/she is referring to Amazon's Elastic Compute Service.

It's Unity's (the game engine) new Entity-Component-System, the blog post is an answer to this presentation:

http://aras-p.info/texts/files/2018Academy%20-%20ECS-DoD.pdf

Unity's traditional entity system is suffering from a number of "OOP-isms" which make it hard/impossible to optimize for performance.

The new ECS strictly follows a Data-Oriented-Design approach, where everything is built around laying out the data in memory in a CPU-cache friendly way (and a few other things that neatly 'fall into place', like spreading work across CPU cores, a specialized 'high-performance' C# dialect, and the ability to move work from the CPU to the GPU).

The big question is how the traditional Unity audience will react, since the ECS programming model is quite a bit different from the old way, and it's no longer as simple to build a game from a jenga-tower of adhoc-hacks ;)

Re: OOP Is Dead, Long Live OOP

#12
post #9

If we just had made inheritance as something to be avoided unless absolutely needed then OOP would have probably never got such a bad reputation. All the other concepts make perfect sense.

We made it optional in many languages, the problem is how it many people teach OOP, and how it gets abused.

Re: OOP Is Dead, Long Live OOP

#13
post #10

Earlier quoted context omitted.

I think this relates to what you're saying. I've never felt any frustration that OOP feels like the wrong tool when I'm using languages that give me the choice to use it or not (like Python, and JavaScript). But when I'm using Java, as one example, it often feels like I'm really locking myself into a design up front. In Python, especially. I'll find myself starting off all experiments or simple projects with function…

But that's the whole point of JAVA. It's an opinionated platform with a hyper-standardized workflow. Sure, that limits creativity, but in many business contexts, the last thing you want is your programmers getting "cute". There's a straight line from requirements to implementation; no meandering involved. At least that's the theory. In practice...

Yes. That may very well be. And I'm not saying Java is bad because of what I described. Just that I experience the, "ugh OOP isn't helping me do what I want to do here" with Java.

Re: OOP Is Dead, Long Live OOP

#14

Author needs to actually state what ECS is. From context I don't think he/she is referring to Amazon's Elastic Compute Service.

It's Unity's (the game engine) new Entity-Component-System, the blog post is an answer to this presentation: http://aras-p.info/texts/files/2018Academy%20-%20ECS-DoD.pdf Unity's traditional entity system is suffering from a number of "OOP-isms" which make it hard/impossible to optimize for performance. The new ECS strictly follows a Data-Oriented-Design approach, where everything is built around laying out the data i…

I'm very glad that Unity is doing this, and it's made me interested in the engine for the first time in many years.

However, it's important to note that Unity is adding an ECS, not inventing the concept.

Re: OOP Is Dead, Long Live OOP

#17

OOP is just a mental model. Deep down everything is made of bits. The church of OOP has failed but if something looks like a duck, walks like a duck and talks like a duck it probably is useful to make a duck class. We're now down to fighting for nuances. You can do most things with OOP or without OOP but each path has some upsides and downsides and most of the time it's good to use some things it provides where it ma…

> OOP is just a mental model. Deep down everything is made of bits. The church of OOP has failed but if something looks like a duck, walks like a duck and talks like a duck it probably is useful to make a duck class. We're now down to fighting for nuances.

No... I think this is missing precisely what was exactly the point of the article (see "(B)" in the text). This post is not a fight over OOP religion. The point of it is if you misunderstand or mischaracterize "nuances" about some idea (if these are actually all nuances, which I think is debatable) and propagate them, then you shield other people from prior (edit: or even current) literature in the area, and hence prevent them from understanding what the relevant techniques really are and how to use them properly at all. This makes them lose a potentially powerful tool in their toolset, which you should agree is an awful thing regardless of what coding 'religion' you follow.

Re: OOP Is Dead, Long Live OOP

#18

Author needs to actually state what ECS is. From context I don't think he/she is referring to Amazon's Elastic Compute Service.

It refers to Entity-Component-System, an architectural design pattern (like Model-View-Controller) that uses composition instead of inheritance to define the behavior of entities in a simulation.

Re: OOP Is Dead, Long Live OOP

#19
Published in 1997, "Component Software: Beyond Object-oriented Programming", followed by "Component-Based Software Engineering: Putting the Pieces Together" in 2001.

https://www.amazon.com/Component-Software-Beyond-Object-Orie...

https://www.amazon.com/Component-Based-Software-Engineering-...

The problem is how badly many schools teach OOP paradigms, and how many frameworks abuse a specific style of OOP.

Post reply on HN