Anthropomorphism Gone Wrong: OOP
loup-vaillant.fr
Anthropomorphism Gone Wrong: OOP
1–10 of 64 posts
Re: Anthropomorphism Gone Wrong: OOP
#2Re: Anthropomorphism Gone Wrong: OOP
#3Re: Anthropomorphism Gone Wrong: OOP
#4I've designed concurrent systems with many processes talking to each other. Each process has a name that describes a profession, owns certain parts of a shared database and transacts with other processes.
Sure that analogy can break down in the limits, but thinking like this allows me to get a much clearer mental picture of what's happening.
Re: Anthropomorphism Gone Wrong: OOP
#5It is really not about anthropomorphizing objects, it is about where the state is kept and who can modify it how. And the right or at least the best choice heavily depends on the problem you are modeling. If you are primarily tracking the whereabouts of students it is probably a good choice that students keep track of that information and provide an interface to update it. If you are primarily interested in rooms and who is inside, it may be better to make the rooms responsible and provide an interface like classroom.enter(student).
Re: Anthropomorphism Gone Wrong: OOP
#6Re: Anthropomorphism Gone Wrong: OOP
#7In the end I'm left with the same conclusion. Given that there is no obvious performance gain from a procedural approach, I would opt for a design pattern that is friendlier to the programmer (the human being). It's helpful to model things this way as an organizing approach. And there are obvious benefits to maintaining state within their respective concerns.
It isn't to say OOP is the only and best answer. It very much depends on the program, but I was hoping for a more obvious win on the procedural side here.
Re: Anthropomorphism Gone Wrong: OOP
#8Re: Anthropomorphism Gone Wrong: OOP
#9I think the procedural option is better. It is just so much less code.