Guest User

Untitled

a guest
Dec 14th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. - Compile time errors become runtime errors (in case of circular dependencies, ...)
  2. - You can't have async initialization
  3. - It's encourages a style I don't like: instead of initialization in a parent class method, most people just call ctor where you then have to do work.
  4. Think `parent.createChildWithConfigFile("foo.ini")` vs `new Child("foo.ini")` <- now you have to do I/O in your ctor.
  5. - It's way harder to understand in what order things get initialized
  6. - It's so easy to write it out by hand
  7. - It encourages you to make a very wide and flat tree/graph because it's so easy to just add one more dependency.
  8. - hides dependencies between projects. E.g. what dependencies are needed by storage? Stuff can be added from anywhere.
  9. - all dependency relations become hidden in this big grab-bag, there is no "this module needs this interfaces and exports these", the bootstrapper for a module just adds stuff to the container it's passed in, but you have no idea what it takes out of the container to created those values.
Add Comment
Please, Sign In to add comment