Closed connorcarpenter closed 10 months ago
I personally prefer discrete systems for code cleanliness and packing things into modules. Separate systems also helps with parallelism.
One example is if my auth system is especially complex, with a lot of system parameters, I may opt to move it to a module. If it all had to be one system, it's not ideal to have processed the auth events, but then those params are never released to be used by other systems, because the mutable references are still held even when not being used.
There are now (or will be, with the next release) 17 different types of events that the Client can emit.. Initially I really enjoyed the simplicity of being able to have a separate system for each type of Event, but I think there may be benefits to just having a single system handle all Client/Server events via a large enum .. It would reduce a lot of code and make things more maintainable going forward, as well as enforce a specific ordering between event types.
Interested if anyone has thoughts on this. Are the current event handling ergonomics worth it?