[reviving a slightly old thread] Note that as of clojure 1.4 you can also do: (:require foo.bar :refer :all) in fact from comments I've seen elsewhere there is a general intention to remove :use entirely?
It'd be good to have some clarity on this. The vast majority of code samples use :use, some with :only. The docstring for ns doesn't even mention :refer! The clojure cheatsheet points to http://clojuredocs.org/clojure_core/clojure.core/ns which _does_ have the new syntax, in the last couple of examples; and it links to the tutorial at http://blog.8thlight.com/colin-jones/2010/12/05/clojure-libs-and-namespaces-require-use-import-and-ns.htmlwhich uses 'use' throughout, except for an easily missable update half way through that says to use :refer. So, to what extent are people actually deprecating :use ? I'm introducing a new team to clojure and trying to suggest that :refer is the way to go, but it's tricky when every code sample out there uses :use. Especially for the situation where you actually want to import a whole namespace - should we be using: (:use midje.sweet) or: (:require midje.sweet :refer :all) ? - Korny On 15 February 2013 00:26, Jim foo.bar <jimpil1...@gmail.com> wrote: > I know that using a bare :use in the ns macro is generally frowned upon > as it provides no hints about what is actually being used... > > However, I 've got 2 namespaces 'abstractions.clj' and > 'concretions.clj'...concretions.clj will eventually use all the protocols > defined in abstractions.clj...at the moment it doesn't but as I work > through it I want to provide concrete records for *all* the protocols... > > Should I just go and :use the entire thing or should I stick with :require > and keep typing 'pro/XXX' a million times? That specific namespace is very > central to my work... > > Jim > > -- > -- > 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. > > > -- Kornelis Sietsma korny at my surname dot com http://korny.info "We do not quit playing because we grow old, we grow old because we quit playing" - O.W. Holmes -- -- 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.