Description
In MEP22, many parts of the code communicate with one another through events (in the sense of a CallbackRegistry) instead of straight method calls. For example, whereas the classic toolbar's mouse_move
just calls self.set_message(...)
to set a message, the call chain in MEP22 is
ToolManager.message_event(...)
-> ToolManager._callbacks.process(Event(...))
-> [find out that ToolContainer.set_message is connected to the event]
-> ToolContainer.set_message(...)
which is deeper split across multiple files, and not even so trivial to search for (some API elements are now strings (event names) instead of functions or classes).
I realize that this is in theory much more flexible (for example, there could just be no listener, or more than one listener), but is it really worth the complexity? Some practical concerns on top of the general complexity: how do we document the event based API? how do we handle deprecations in it? (likely both are solvable problems; it's just that we have a lot of experience and machinery for handling these for function/class-based APIs, not so much for event-based ones.) The alternative, of course, would be to replace some of these events by straight function/method calls.