What's problematic about it is that it's slightly easier to do the wrong thing. It seems insignificant, but 98% of times you use use, it's going to be wrong. Also, 'use only' means I have to change my calling NS twice in different parts of the emacs buffer any time I change a function name in the called namespace.
On Tue, Jul 23, 2013 at 3:08 PM, Cedric Greevey <cgree...@gmail.com> wrote: > :use...:only doesn't strike me as especially problematic, since it > documents the specific symbols it's importing and from where. > > > On Tue, Jul 23, 2013 at 3:04 PM, Sean Corfield <seancorfi...@gmail.com>wrote: > >> We only have :use in a couple of "legacy" tests and two scratch >> projects. We've switched from :use to :require .. :refer :all for >> situations where :use used to make sense (primarily in a test ns where >> we want to just refer in all of the ns being tested). We have a >> handful of places where we :refer :all elsewhere because the code >> reads better without ns aliases all over the place and we bring in a >> lot of functions. >> >> Certainly in blogs and documentation, :require .. :as short alias >> seems a better approach for teaching / explaining things but I'm sure >> I'm guilty of :use in earlier blog posts about Clojure (... checking >> ... yup, three blog posts from early 2012 contain :use, mostly with >> :only, so those should be updated to use :require / :refer instead). >> >> Sean >> >> On Tue, Jul 23, 2013 at 11:27 AM, Gary Trakhman <gary.trakh...@gmail.com> >> wrote: >> > We should scour clojuresphere for uses of 'use' and automatically post >> > github issues to the projects of interest, and redefine the ns macro to >> > issue a warning with use. >> > >> > Does anyone actually like 'use'? >> > >> > Require is always more evident. >> > >> > >> > On Tue, Jul 23, 2013 at 2:17 PM, Jozef Wagner <jozef.wag...@gmail.com> >> > wrote: >> >> >> >> +1, :use is IMO an antipattern. >> >> >> >> I hate it mainly in blogs, where they explain some new API. They :use >> like >> >> 3 namespaces and you have to guess which fn is from which ns :) >> >> >> >> JW >> >> >> >> >> >> On Tuesday, July 23, 2013 5:50:50 PM UTC+2, Greg Slepak wrote: >> >>> >> >>> I think I read somewhere that :use is no longer encouraged, but I >> could >> >>> be mistaken. >> >>> >> >>> From what I've read, it seems like most people agree that Clojure has >> too >> >>> many ways of including/importing/referencing/requiring/using things: >> >>> >> >>> >> >>> >> http://blog.8thlight.com/colin-jones/2010/12/05/clojure-libs-and-namespaces-require-use-import-and-ns.html >> >>> >> >>> The above gives a very nice explanation of all the various difference, >> >>> but it also acknowledges their complexity. >> >>> >> >>> Since :use uses :require, and since :require can do everything that >> :use >> >>> can, can we simplify Clojure programming a bit for newcomers by >> deprecating >> >>> the use of :use? The situation in ClojureScript is even worse because >> it >> >>> adds :require-macros on top of all the other ways of including files. >> >>> >> >>> Ideally, it would be awesome if there was just a single directive for >> >>> everything, but perhaps there's some complicated low-level reason why >> that's >> >>> not possible. :-\ >> >>> >> >>> Thoughts? >> >>> >> >>> Thanks, >> >>> Greg >> >>> >> >>> P.S. If this has already been brought up you have my sincere >> apologies. >> >>> >> >>> -- >> >>> Please do not email me anything that you are not comfortable also >> sharing >> >>> with the NSA. >> >>> >> >> -- >> >> -- >> >> 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. >> >> >> >> >> > >> > >> > -- >> > -- >> > 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. >> > >> > >> >> >> >> -- >> 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 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. >> >> >> > -- > -- > 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. > > > -- -- 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.