On 3 February 2013 19:53, Miguel Moquillon <[email protected]> wrote: > Le 03/02/2013 19:27, Denis Kudriashov a écrit : >> 2013/2/3 Miguel Moquillon <[email protected] >> <mailto:[email protected]>> > >> >> And the Java people are preparing to throw away the classloaders >> mechanism with Jigsaw that will be in Java 9. (The classloading is a >> brittle and error-prone mechanism.) The aim of jigswa is to design >> and implement a new module system for the Java SE platform and to >> apply that system to the platform itself and to the JDK (more >> information in the project homepage >> http://openjdk.java.net/projects/jigsaw/ >> <http://openjdk.java.net/projects/jigsaw/>). > >> >> Miguel >> >> >> I know about this. But let's talk about pharo. Now pharo can't do >> this. You can't have two versions of same package at same time in >> image. So how we can implement it? And do this is really important? > > > IMHO, it is not important and should be avoided because it is error-prone > (what is the actual version used by the objects?). This can even be a > nightmare with a lot of dependencies when an error occurs.
That means that you have to be _extremely_ careful about what libraries you use, because you might well end up having different parts of your application depending on different versions of some library used by various libraries you use. The Metacello docs call this the "diamond dependency" problem. The thing with selector namespaces is that, at least as far as I'm aware, it's an open research problem. The classboxes work, if I recall correctly, pointed out several shortcomings in their approaches. Unless one moved ownership of methods from classes to packages, and ended up with a system looking a lot like Clojure...? At any rate, it's clearly not a simple thing or we'd have already done it. frank > Don't forget: keep things simple (it is always more easily to build too more > complex systems). > Having a program depending on a package in two different versions at the > same time in an image is in my opinion a design error. And if your program > depends on some tiers-party packages that depend on a different version of a > same package, then you should decide for the more recent one (or according > to other heuristic) and fix, if needed, the dependency in the others > packages. This is more easy to do with Pharo than with Java. > Even in Java, we take care to avoid these situations by using a dependency > exclusion with Maven. > > Miguel >
