On Monday, 13 May 2013 09:20:19 UTC+8, Stuart Sierra wrote: > Isolated dependency loading is not possible in the JVM without complex > ClassLoader-based schemes like OSGI, which come with their own set of > problems. > > -S > > Hi Stuart,
That's true for compiled Java classes on the classpath, but I don't see why it needs to be true for JVM languages like Clojure that are already loading / compiling most code at runtime. In effect we already have a "complex ClassLoader based scheme". Maybe we could try to develop towards some kind of lightweight dependency loading system that avoids this problem? A lot of utility functions are so small that it wouldn't matter if you loaded them many times. It might even improve performance if the JIT is able to optimise different instantiations of functions based on how they are being used by different parts of the code base. The alternatives aren't pretty: 1. We do a lot of "cut and paste" coding. OK in small doses, but not going to scale. 2. We get into dependency deadlocks with different libraries using different versions 3. Everyone develops their own utility libraries independently and manages against this 4. Everyone co-ordinates their dependency updates (yeah, like that's going to happen...) 5. We wait 10 years until Java develops a decent module system that we can use I'm personally feeling this problem a lot: the move towards small composable libraries in Clojure is IMHO the right direction, but I'm concerned that it's making the dependency management problem more complex and we haven't (yet) got the tools to handle this. The nightmare scenario is that we end up with thousands of individually cool and useful libraries, but no practical way to make them work together. I touched on a few of these themes with my post "The Environment as a Value", which would be one way to solve a lot of this via isolation of different versions of code: https://groups.google.com/forum/?fromgroups=#!topic/clojure-dev/S8BawG7nzJA -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.