ECS is also shit.OOP has been used for over half a century and remains the most popular professional programming paradigm in 95+% of usecases.
>>106904649The anti-OOP talk is just parroted by rust zealots who don't even understand what they're talking about it.
>>106904649totally agree saaar!!!! OP is #1 in our Apple/MS/Oracle workgroupsplease redeem!!!!!
>>106904771>OOP bad because some people are bad at utilizing itWow, you sure showed him.
>>106904812as opposed to>OOP good because there is an endless sea of indian code monkeys using it
>>106904649A better question is, why is ECS so new? I know it's unintuitive at first, but when you work with it once, it becomes so obvious that most concepts should be abstracted as E, C and S.
unpopular opinion but i find ecs code much more elegant than even the cleanest written oop slop
>>106904649Skill issue.
>>106904649>OOP has been used for over half a centuryThe programs we have been using in that time have been examples of increasingly high quality.
>>106904877>>106904649ECS is something you can roll in a couple hours in any language that supports OOP features, how is it an OOP alternative?
The most watched video on cppcon youtube is Mike telling them their bloat sucks KISS. lmao
>>106905684actual 90 iq nodev detected
>>106904835Nobody made that argument and it doesn't make any sense anyway.
>>106904812and data oriented design is bad because?
>>106905700Mike Acton's talk isn't "use ECS". It's understand your problem and solve it. Model your program around the actual data it's processing, not what seems nice to you.
reminder that idiots who make these threads are jeets and trailer trash who got a "CS degree" at a state college and dont want to lose their Java/C#/C++ job to someone who has an IQ higher than their room temperature IQthe level of intelligence that it takes to learn OO is the same as javascript, probably less as javascript has a very advanced and cleverly designed kind of OO that allows objects to be created without classes and use functions in a high order way. OO in C++ is pure streetshitter kindergarten level bullshit of just connecting C structs with functions and anyone who brags about it is the lowest form of idiot you will ever find in the IT field
>>106904771Hush, Chang. The humans are talking.
>>106906886that's a lot of words to say "I got filtered by OOP"
>>106906939oh no!!!! I have been filtered by the saarswhy am I not worthy to do the needful!!!!!
>>106905684I don't think it's an alternative, but a sub style of. After looking it over it just looks like OOP principles but done a very specific way, outside of the typical "design patterns" OOP programmers are more familiar with.>>106905740>the super useful IQ insulter that offers no insight or rebute
>>106904649A single month spent working with "industry professionals" should be enough to convince anyone with a 3+ digit IQs that all software "best practices" are a meme.
>>106906939OOP is a filter. Just not in the way you think it is.
>>106907090thank you saar for your deep wisdom! you have done the needful!
>>106907116Speak Christian.
>>106907080>Data oriented design is actually a sub style of OOPIs this the new cope?
>everything is OOPyawn
>>106907379this but unironically
oop more like poop
>>106908232then no one cares
>>106908240just say it in frog
>>106904649oop is slow shit that goes against what the CPU wants which is bulk processinghttps://www.youtube.com/watch?v=UGLnBD-AEbA
>>106907268Looking at ECS, its focus is on the entities being composed of components. An entity is an object, and components are a variety of different structures and data types that an entity can possess. This is basically describing OOP but being used in a specific way with a specific goal that centers around entities, where as typically OOP people will focus on different design patterns or maybe domain driven design types will focus on their own way of chopping things up. Ultimately it's all OOP just some 'sub style' of OOP with different guiding principles.
>>106909297this is your brain on curry and poop
>>106909297you're talking like you're literally googling arguments and selectively reading and picking shit to make a made up pointactually read the ecs wikipedia article in full if you want to stop embarrassing yourself
>>106904649Everything beyond basic procedural programming has been a waste of time.
>>106909406letting shitskins into the industry was the mistake
>>106904877Seems very intuitive when dealing with games though.
My immediate reaction when seeing DoD and ECS was - that's just in-memory relational database.If you ever had a intro database class and learned about normalization, data modelling in tables, and relations using unique keys (IDs), and learned the most common data structures and algorithms used for databases; then it's all very intuitive and a lot of makes sense.And also nothing new, have been used for half century, as long as OOP.The performance characteristics of modern computers and how can you structure your data and programs to fully utilize it is also interesting.But most of it only really applies game programming where you have massive number of entities, and plenty of systems and components used on more than one entity, and tons of components mixed in many variations; and very obvious and ever-present performance deadline - single frame. And especially for game engines where you don't really have a control or information about the actual game and can't hardcode and streamline for it.
>>106909262now show the difference in something other than a pure number-crunching benchmark with no branching in its logic
>>106904649Gooooooood morning saar
>>106909362I have read it. I just now re-read it.So is my understanding correct that the entity is not 'decorated' with components, in the sense a class would inherit a specific base class or set of base classes, but rather it just points to an instance of each component? Kind of how >>106910051 calls it a relational database?Initially when I read it, it seemed like the entity is usually an ID with a type, and then it has components which can be classes, structs or arrays so I imagined it as 'decorated' but after a reread my initial interpretation may have been off. Would love some actual constructive discussion vs "fuck you retard curry nigger"
>>106904649>OOP has been used for over half a century and remains the most popular professional programming paradigm in 95+% of usecases.source?
>>106910629Yeah, its not that the entity itself receives or implements behavior. It is just a binding agent between instances. But if you look at the entity as a whole surface area of all its components, you could think of the overall thing as having these multiple decorators [spoiler]i dont know what a decorator is[/spoiler]
>>106910685maybe binding agent between instances is not a good description. I like the "keyring" concept where it collects different components into one collection or association.
>>106904649>software industry at its lowest quality its ever been>OOP remains the most popular professional programming paradigm in 95+% of usecases.I see
>>106910629The least intuitive thing about this imho is the decouple of component and system. Ideally systems only work on some subset of components and not on all component, that's reasonable. But you often get a systems that only work on single component, and that just makes the split feel redundant.Another thing that feels redundant is that you often get a components with single or countable(=small finite and fixed number of) instances.You can hack a lot of things without a full block ECS with such aggressive decoupling.It's why lots of people just pass on it and use only some apects of it.One thing I have to critique about every anti-OOP pro-DoD video is that they take some geometry-related example, and showcase how array of virtual pointers to data with getters and setters is slower than flat array of datas. It's obvious, boring, and often with only 2x performance boost.What they forget to show but should is that if you have some fat base class, then ALL parts of your program starts slowing down when your base class starts getting larger due to increasingly worse memory locality.The decoupling of entities to their own data structure (aka SoA = structure of arrays) keeps the performance characteristics under control when your number of components grow (in contrast to very fat base class).Again if you don't buy to full block ECS, you can have common base class but not too big, and put very sparse components into their own data structure (usually hashmap for the sparse ones).
>>106910629>So is my understanding correct that the entity is not 'decorated' with components, in the sense a class would inherit a specific base class or set of base classes, but rather it just points to an instance of each component? Entities can't point to anything because they're just IDs.A "world" class keeps all entities and points to their components for coherency.The components are stored in a "storage", so for example, we have HealthStorage that stores all Health components. We can easily represent the component with a dictionary, where the key is the ID and the value is health points, e.g.{1: 100.0, 2: 84.0, 5: 12.5}This is easier to reason with, but ideally you're supposed to use a data structure that is tightly packed, so a sized array [100.0, 84.0, 5.2] with perhaps a matching helper array that tells you which entry belongs to which entity id.The advantage here, as opposed to moving through pointers, is that when you're iterating over all values you can read them very quickly from contigious memory.A HealthRegenerationSystem does not need to know who owns the Health component, all it has to do is look at one array, transform every value, and it's already done. Other systems may want to know whether a specific entity has a component, at which point you can just query "world", instead.>>106911059>But you often get a systems that only work on single component, and that just makes the split feel redundant.If you feel that way, then your components are probably not atomized enough. For example, I can have a component "Plant" and a component "PlantGrowth". I could easily combine them, since all plants are supposed to grow, but this way I can also remove the component entirely when a plant is fully grown to avoid querying over them. I now also know that a plant without a PlantGrowth component is probably a fully grown plant.
>>106911382>If you feel that way, then your components are probably not atomized enough. it's usually the player-oriented components - camera, controls, UI stuff
>>106909297>An entity is an objectit isn't, its an array index
>>106911382all this feels like it's a whole level of abstraction lower than OOP, which could have both an entity interface and an object interface
>>106905740ECS is implemented using OOP. They're not comparable things at all.
>>106911382>a dictionaryand pray tell, what is a dictionary?
>>106911936it's not, it's just lowcode gamedev retards having their mind blown by a special case of dependency injection
>>106904649>OOP has been used for over half a century and remains the most popular professional programming paradigm in 95+% of usecases.Spoken like a true DURGA graduate. I can smell your garam masala from here.
>>106913837Professor Babu can code better than 99% of madachods on /g/
>>106911936>all of this could have been OOP!See, this is why no one wants to talk to you. You always manage to say the most uninformed nodev shit. Yes, you can model everything with anything, but ECS provides unique benefits from pure OOP paradigm.
>>106915694REDEEM SAAR!1
>>106915920>you said something i don't agree with so i'm not going to talk to you at all (except announcing not talking to you)>strawmanit's like i'm reading a leftist comment on some clickbait political article
>>106905825OP made this argument and his argument makes no sense because of it.
>>106904649True enlightenment is when you understand that OOP is just functional programming under the hood