Closed GoogleCodeExporter closed 9 years ago
I guess this is a duplicate of
http://code.google.com/p/atinject/issues/detail?id=4,
but I really like your suggestion of the single constructor-taking used
automatically and without @Inject as the injection point.
Original comment by thiag...@gmail.com
on 28 Jul 2009 at 3:55
Sorry, I got a typo: it should read "single argument-taking constructor".
Original comment by thiag...@gmail.com
on 28 Jul 2009 at 3:56
You already noted that Guice wouldn't support this, but I should probably give
some reasons:
1) I think we have too many rules already. This adds yet another exception that
users must learn. Its value
doesn't outweigh its costs. On the balance, I think it does more harm than good.
2) You said yourself that this feature supports legacy code. Our spec is
forever. We haven't let legacy concerns
hamper it so far, and this doesn't seem like a good reason to start.
3) I don't want this feature to unduly influence users' design decisions. For
example, "if I can somehow avoid
adding a second dependency to this class, I can avoid explicitly using
@Inject." I can imagine users creating
context objects that compose several dependencies, one of the patterns DI aims
to replace.
Other injectors can support this feature, but Guice will not, so it shouldn't
be required by the standard.
Original comment by crazybob...@gmail.com
on 28 Jul 2009 at 4:09
Original issue reported on code.google.com by
james.st...@gmail.com
on 28 Jul 2009 at 9:42