> > Also, about the explicit module dependencies declarations: it seems like it > should be possible to automatically generate these by analyzing the namespace > metadata. Is there a reason to force this to be explicitly declared instead? >
The reason the declaration is necessary is quite simple and the only way to get "optimal" module structure. A simple example: (ns my-app.common) (ns my-app.module-a (:require [my-app.common] [clojure.string])) (ns my-app.module-b (:require [my-app.common] [clojure.string])) If you define 3 modules common, module-a, module-b each with its respective entry points the compiler cannot figure out the dependencies because there is a duplicate dependency on clojure.string. You want module-a depends on common and module-b depends-on common. But the duplicate dependency on clojure.string prevents this and if you leave the program to figure out the dependencies you'll either get module-b -> module-a -> common OR module-a -> module-b -> common. Leaving the user with 3 requests to fetch module-a instead of just 2. Ideally what SHOULD happen is that the clojure.string namespace is moved to common, but I do not know of any algorithm that can figure this out. With the explicit declaration we can do this easily. Hope that made sense. /thomas -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
