I'm curious what the best practice is here.

Let's say that deep in your code you wanted to create a new instance of 
MyObject and pass it a FooService...

One could use an injector to do this.. but what if we actually forgot to 
bind anything to FooService?

You would deploy your application, it would be running just fine for 
months, then all of a sudden you would need FooService and your app would 
fail.

How does one avoid that scenario?

If you used explicitly provided dependencies, your app would fail at 
compilation time.

Now we've postponed to fail at run time.. which is not fun.

Any solutions here?

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-guice/b138aea2-f477-414b-8b36-f3e306ca12d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to