3 ms·
That sounds like a poor man's component if you already separated it into another class...? And that data is no longer belonging to the instance now.
by mmis1000 5y ago
That sounds like a poor man's component if you already separated it into another class...? And that data is no longer belonging to the instance now.
- dragonwriter 5y ago> And that data is no longer belonging to the instance now. It belongs to the correct instance. The noun in the domain to which the information logically uniquely belongs is a relationship, not a character (of which there is typically more than one with different roles in a relationship, the number and roles varying by type of relationship.) One problem that textbook OOP examples produce is that they tend to favor a heirarchy of physical entities as examples, which has the virtue of familiarity but really obscures the analysis of nouns in the domain, the most important of which in most real domains are the nouns describing relationships, activities, and events.
- mmis1000 5y agoThe same thing can apply to every other property I think? probably you can seperate the User::name into a PersonIdentityProperty something like that, and remove the type limit to allow it to contain any property. Then it is basically a ecs now. And that do actually has some pros. People can have multi name, you system at least works properly with it now(and for free).
- meheleventyone 5y agoOOP based component approaches are really common so it shouldn't be surprising.