Skip to content

Think of a way to handle class initialization order of operations dependencies #13

@bglendenning

Description

@bglendenning

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions