Comment #3 on issue 395 by sberlin: InjectorBuilder
http://code.google.com/p/google-guice/issues/detail?id=395

I think both the builder pattern & the Binder/Module pattern solve the "method overloading sucks" issue, but putting methods on Binder opens up more issues than it solves. For example, what happens if one Module calls stage(Stage.PRODUCTION) whereas another module calls stage(Stage.DEVELOPMENT) (or substitute stage with any other future injector building method that takes a parameter)? The only sane thing to do would be to throw an error. The builder API does a nice runaround this by only
letting the builder of the Injector decide how it's built.

(I'm not 100% sure I understand the "Module instances are reusable" comment, so my
comments may not directly address what you're asking.)

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice-dev?hl=en.

Reply via email to