Building Services with Self-Reference: A Two-Step Process
I'm trying to build some services that mutually refer to each other (or themselves) during their initialization. It seem that forces me to do a two step process when building Layers. First I need to have a Layer that builds the services then immediately after they're built I need to call an
init
init
function on each that may refer to the service itself or to other services.
Is there a better pattern for this? This "two step" pattern feels messy.