On Thursday, July 18, 2013 4:34:49 AM UTC-4, Jozef Wagner wrote:

> Compiler loads and refers clojure.core namespace for each
> new namespace. In my projects, I often have one or two
> namespaces I use nearly in every other namespace. (e.g.
> clojure.tools.logging or clojure.string). It would be
> convenient if I could specify ns defaults somewhere and
> those declarations would be used for every compiled
> namespace.


You can do this without hacking the compiler if you're
willing to add one extra line to your source files.

Just define a function that `require`s and `refer`s all the
symbols you want, and call it at the top of each namespace.
You'll break tools that expect to be able to infer namespace
dependencies from the literal source (e.g. tools.namespace)
but it will do what you want.

-S

-- 
-- 
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.


Reply via email to