News for hackers. Stuff that matters.
Re:The Repeated Deaths of OOP (2015) by yakubin on Sunday June 06, 2021 @07:06AM (#27412267)
The article doesn't argue that ECS is a good fit for everything. It argues that it is a better fit than OOP for some of the things OOP was intended for. And that it's a broader theme, where OOP is usually not the right tool for the job, even when it was originally intended to solve that particular job.
Re:The Repeated Deaths of OOP (2015) by Rochus on Sunday June 06, 2021 @07:09AM (#27412285)
The article is primarily trying to suggest that "OOP" has "died" so many times that it should no longer be used. As if OOP was an ideology to be committed to or not.
Re:The Repeated Deaths of OOP (2015) by girvo on Sunday June 06, 2021 @07:45AM (#27412459)
That is not what I took from the article at all.
Re:The Repeated Deaths of OOP (2015) by ehnto on Sunday June 06, 2021 @08:22AM (#27412660)
I'm confused. ECS is a type of OOP, is it not? An entity is an object in the same way a model is an object.
Re:The Repeated Deaths of OOP (2015) by ratww on Sunday June 06, 2021 @11:48AM (#27413932)
Not really. An "Entity" in most modern ECS implementations is normally implemented as an integer, which is used as a handle to which multiple components refer to.

A "Component" is normally implemented as a struct, and a "System" as a standalone function. No encapsulation here.

Of course you would have to implement all of the above using classes and objects if your language doesn't have support for structs or standalone functions, but that's just an implementation detail. The concept itself is not a subset of OOP, and breaks many "rules" of OOP.

Re:The Repeated Deaths of OOP (2015) by tsimionescu on Sunday June 06, 2021 @08:58AM (#27412843)
I think one of the most core ideas of OOP is encapsulation, and in this way ECS is radically opposed to OOP.
Re:The Repeated Deaths of OOP (2015) by meheleventyone on Sunday June 06, 2021 @07:24AM (#27412352)
It does a poor job of this in light of component based OOP approaches.