Hi, this is my first post to the list (though I've been lurking for a while) and I'm not yet actively working with Clojure, so take what I say here with a grain of salt :).
On Sep 4, 2008, at 3:28 PM, Rich Hickey wrote: > On Sep 3, 7:51 pm, Rich Hickey <[EMAIL PROTECTED]> wrote: >> On Sep 3, 5:14 pm, Chouser <[EMAIL PROTECTED]> wrote: >> >>> On Wed, Sep 3, 2008 at 4:36 PM, Stephen C. Gilardi >>> <[EMAIL PROTECTED]> wrote: >> >>>> I saw some discussion of how to fix this on the IRC log but I >>>> can't get on >>>> at the moment. >>>> It looks like the current plan is to change "ns" to remove the >>>> sensitivity >>>> to "the namespace is already defined" and add "(:refer- >>>> clojure ...)" to the >>>> list of supported reference arguments. >> >>> Well, here's a patch for the behavior discussed on IRC. I'm posting >>> it only because it's complete and working, not in any attempt to >>> stifle further discussion. If we settle on any alternate solution, >>> this patch can just be ignored. >> >> I think the only problem is in the case of subsequent use of ns. I >> originally envisioned the 'main' .clj file doing an involved ns and >> subsequent files just doing (ns foo), as well as the use of ns at the >> repl to change namespaces. Now, if you did >> >> (ns foo (:refer-clojure ...) ...) >> >> any later (ns foo) is going to bring in all of clojure. I'd prefer it >> did nothing but change *ns*. >> > > After sleeping on it, I think what we have been calling ns should be > called defns instead, and ns should just set *ns*. Thus there should > be only one defns for any particular namespace, and (ns foo) can be > used to set the namespace for a file and/or change the namespace at > the repl. > > Thoughts? So, if I understand this correctly, you'd have a file myns/myns.clj containing (defns myns) along with :require and/or :use clauses for the dependencies of the whole ns. Other files under myns/ would contain just the statement (ns myns). Personally, from a separations-of-concerns standpoint, I'd prefer if every file were responsible for getting access to all the libs it needs. Oh, one (tiny) niggle wrt the name "defns": it looks a bit like the plural form of "defn", so it might be confused with defmulti or something that defines a bunch of functions at once. just my 2ยข, --Chris --~--~---------~--~----~------------~-------~--~----~ 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 To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---