|
|
|
|
|
by jasode
3718 days ago
|
|
>One reason why I think this occurs is that there is no concept of a 'message' in OOP, only methods or functions of a class. If you mean there is no formal/explicit OOP syntax in C++/C#/Java etc for a "message bus" or "queue" for a decoupled publish/subscribe type thing, you're right. Yes, Golang/Erlang have that concept a little more "baked" into the language. But that's still orthogonal to the supposed OOP flaws you brought up. The C++/C#/Java approach to the missing "message" functionality would be either to create a class with a managed buffer to "hold messages" for other classes to write or read from... or use a library that interfaces with an external messaging bus. |
|
Yeah, I explicitly covered this. I don't feel like piling some 'controller' object on top of other objects necessarily accomplishes what I'm after.
But it does work and I've used the pattern plenty.