4 ms·
The examples don't illustrate this very well, but the benefit of message passing is flexibility/decentralization of events. To use your example, if when you sav
by michael_fine 12y ago
The examples don't illustrate this very well, but the benefit of message passing is flexibility/decentralization of events. To use your example, if when you saved the profile you wanted to also pass it to an internal analytics database, makes more organizational sense to have that database just register a listener for a save profile event, rather than having to add a very auxiliary step within the saveProfile function. This gets more and more helpful the more listeners you have, and while I haven't looked at this library in depth, can also be a very natural way of writing async code.