I switched to just using (:require) with :as and :refer unless there's a really good reason to use :use. It stops me from accidentally making the mistake of dropping [my.ns.core :as foo] into a growing (ns (:use …)) form.
-- '(Devin Walters) On Sunday, March 10, 2013 at 3:03 PM, Jonathan Fischer Friberg wrote: > I would say using :require :as is in almost all cases better. > However, I think :use is preferred if almost everything done > in the current namespace depends on the used namespace. > Though, no more than one namespace should ever be imported > with :use in the same namespace. > > In your case I think it's acceptable to :use the namespace with > protocols - but no more. Also, :use :only is to be avoided almost > as much as :use. I tend to use :use :only for common functions > that are not in core. clojure.java.io/resource > (http://clojure.java.io/resource) being the most common > one. > > Jonathan > > > On Sun, Mar 10, 2013 at 1:40 PM, Alex Baranosky > <[email protected] (mailto:[email protected])> wrote: > > From experience in your case (300+) I'd use require/as with a small prefer > > like p/ . > > > > > > On Sun, Mar 10, 2013 at 5:10 AM, Jim - FooBar(); <[email protected] > > (mailto:[email protected])> wrote: > > > On 10/03/13 12:03, Marko Topolnik wrote: > > > > I came to prefer one-letter prefix for a common ns over no prefix at > > > > all. Once you get accustomed to it, prefixless fns start looking > > > > "wrong", and the overhead of two chars is something we can live with. > > > yes I agree with you 100%...this is my approach as well for 'useful' > > > namespaces...for example a hypothetical utilities.clj is good if it's > > > aliased uniformly across namespaces as 'ut'...do you do the same with > > > your abstractions? do you always alias your protocols.clj? my question is > > > specific to protocols as they will only be used in a couple of places, > > > mainly in the 'concretions' namespace...to be honest, at the moment I'm > > > using :refer :all simply because I'd need the characters 'pro/' more than > > > 300 times in that namespace...it would actually make readability worse in > > > my opinion... > > > > > > > > > Jim > > > > > > -- > > > -- > > > You received this message because you are subscribed to the Google > > > Groups "Clojure" group. > > > To post to this group, send email to [email protected] > > > (mailto:[email protected]) > > > Note that posts from new members are moderated - please be patient with > > > your first post. > > > To unsubscribe from this group, send email to > > > [email protected] > > > (mailto:clojure%[email protected]) > > > 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 [email protected] > > > (mailto:clojure%[email protected]). > > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > > > > > -- > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to [email protected] > > (mailto:[email protected]) > > Note that posts from new members are moderated - please be patient with > > your first post. > > To unsubscribe from this group, send email to > > [email protected] > > (mailto:clojure%[email protected]) > > 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 [email protected] > > (mailto:clojure%[email protected]). > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to [email protected] > (mailto:[email protected]) > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > [email protected] > (mailto:[email protected]) > 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 [email protected] > (mailto:[email protected]). > For more options, visit https://groups.google.com/groups/opt_out. > > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. 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 --- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
