On Sat, Aug 6, 2011 at 6:42 PM, Mark Engelberg <mark.engelb...@gmail.com> wrote: > On Sat, Aug 6, 2011 at 2:30 PM, Rich Hickey <richhic...@gmail.com> wrote: >> Why all the attention to :use - I thought everyone agreed using it is a bad >> idea? > ... >> The only benefit >> I see is that you can avoid a (minimum 2 character) prefix. > > The other benefit is it saves you from the cognitive load of having to > know exactly what namespace every given function comes from in order > to use it. > > For some libraries the burden of knowing which namespace a function > comes from is significant (e.g., Incanter). > > Also, those namespace prefixes really get in the way if you are > defining a DSL, or redefining things from Clojure's core (e.g., > because you want to use an enriched cond macro). > > In a nutshell, when working within a specific domain, sometimes you > want to take a certain set of functions/macros as "primitive" to your > program, and don't want to constantly have to think of the details of > how the library that defines them is structured.
+1, and the objections raised to :use don't apply if we require that :only go along with it. (:use [x :only foo bar baz]) could with minimal effort, and probably should, be available to make foo, bar, and baz refer to such "primitives". -- Protege: What is this seething mass of parentheses?! Master: Your father's Lisp REPL. This is the language of a true hacker. Not as clumsy or random as C++; a language for a more civilized age. -- 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