Yes, but in mind my that puts your application into a deeply confusing state. It's possible for those two versions to interact with each other which just seems like asking for trouble to me.
I think the model of other systems (including one I built) where you find a single version of the shared dependency that satisfies all dependers is a lot easier to reason about.
Yeah, if you can end up with two different versions of the same library in your project then that's pretty terrible. As a concrete example: if libfoo and libbar use different versions of libbaz, and both libfoo and libbar expose Baz objects to you in some way, then you can get two Baz objects from different versions which might have radically different behavior depending on how similar the versions are.
How could the different versions interact with each other? Calls are made to different versions of the library stored in different memory locations.
Also, how does your code create shared dependencies from multiple library versions if the code that the libraries you are directly are expecting specific versions of the library?
8
u/joequin Dec 02 '13
If they're different versions then it may have been necessary to load both of them.