On 04.02.2010, at 03:20, Timothy Pratley wrote:
My initial reaction is that I will use a central dedicated ns template
for convenience.
That's what I do as well - one template per project.
One thing I've wondered about with clojure core namespaces is:
(clojure.xml/parse "foo.xml") ;; works fine
(xml/parse "foo.xml") ;; to do this you need to require
clojure.xml as xml
Indeed.
Personally I dislike the use of clojure.xml :as x
=> (x/parse "foo.xml")
Because I want it to be recognizable as a core lib.
Why don't you just call it core-xml then? Is that too long?
So a useful ns+ feature might be for core libs to
be pre-aliased in this way, and to warn or disallow :as which
conflicts with core libs to prevent the reverse confusion.
There is a practical difficulty: what exactly is a "core lib"? Running
Clojure code cannot determine if a library was shipped with Clojure or
added later on. So the only solution would be to hard-code the list of
"core libs" into the namespace management system.
Konrad.
--
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