I think you mean :as vs :refer? The consensus is that using :as makes it easier to see where each symbol comes from when you're reading the code -- and avoids name conflicts between functions in different namespaces.
If you use :refer, you lose that visibility. However, there are some symbols where the namespace alias just looks weird so there are cases where :refer helps make the code more natural -- such as using a library that provides defsomething forms (because we're used to (def ..), (defn ..), (defmacro ..) etc). On Fri, Jun 5, 2015 at 8:33 PM, Todd Stout <[email protected]> wrote: > What is considered idiomatic when using :as and :require in your namespace > declarations? I understand that :as will require everything in the > namespace to use symbol/fn syntax. The :require usage will mandate more > verbose symbol references in the ns declaration, but your code in that > namespace will not require the symbol/fn notation. When is one preferred > over the other? > > -- > 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/d/optout. > -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.com/ "Perfection is the enemy of the good." -- Gustave Flaubert, French realist novelist (1821-1880) -- 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/d/optout.
