-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Remove registration options entirely #23
Comments
I wanted to make this proposal first because removing
And a corresponding
Note: if we choose to separate |
I am backing out of this proposal on further consideration. Singletons must be per-container, not per-registry, so it is inappropriate to use a factory registered in a registry to maintain state per-container. |
Currently there are two registration options:
If we move ahead with #21 then we can eliminate the
instantiate
option.In order to remove the
singleton
option, we will require registration of factories that provide singleton construction behavior. In other words,Factory#create
will need to return the same instance every time. This implies that factories can and should maintain state (frankly, the "can" part is a given with anycreate
function).The text was updated successfully, but these errors were encountered: