-
Notifications
You must be signed in to change notification settings - Fork 0
Think of a way to handle class initialization order of operations dependencies #13
Description
Some classes depend on events from others before they are operational. Importing these classes in the wrong order causes errors. The application should avoid initializing components until they are all ready, and the order of initialization should be based on dependencies. Perhaps specifying dependencies in each class, and then ordering the initialization functions could be the solution.
It may be possible inspect each class object for state dependencies automatically by reading Receive method names and connecting those to the send method calls in the other classes to determine dependencies. For instance, if Logger has a logReceive method, then each other class can be inspected for a send("log") call. Not sure if this level of introspection is possible. It may be required to create methods for notifier behaviors to get this to work.