> :require :as is always good and generally preferred over :refer or :use 
:only.
I think we all agree with this, but in reality :use with/without :only is 
very widely used in a number of real project I've seen on github.
:use (especially without :only) makes code reading painful and usually 
reading time including other's is much longer than writing time.
I hope :use is used only for popular library such as clojure.test, etc.

On Friday, November 9, 2012 3:54:38 AM UTC+9, Justin Kramer wrote:
>
> Sorry, yes, to clarify -- :require :as is always good and generally 
> preferred over :refer or :use :only.
>
> Justin
>
> On Thursday, November 8, 2012 1:42:26 PM UTC-5, Luc wrote:
>>
>> I am pragmatic and quite lazy, I use require with an alias and use mostly 
>> with stuff like 
>>  clojure.tools.trace, clojure.pprint where selecting explicit vars brings 
>> no or little value (in my opinion). 
>> You either need most of the public vars or the potential name conflict is 
>> a remote 
>> possibility a few light-years away. 
>>
>> I almost never select explicit vars from external name spaces. I find 
>> this cumbersome to manage. 
>>
>> With (short) aliases, I get auto expansion of all public vars as soon as 
>> I type the / 
>> in CCW (Eclipse plugin). With a little consistency in choosing aliases, 
>> it's then very easy to find out while reading the code where a reference 
>> comes from. 
>>
>> I am also older than most of you guys so the less stuff resides in my 
>> working memory, 
>> the easier I can cheat with the slowly eroding aging process :) 
>> I leave most of the work to the computer. 
>>
>> Mmmh, maybe I should create a pocket guide for elderly Clojure coders 
>> someday... 
>>
>> Luc P. 
>>
>> > Current best practice in my view: 
>> > 
>> > For Clojure 1.4+, do not use :use at all. Use :require :refer 
>> > (judiciously). :refer :all is almost never a good idea. 
>> > 
>> > For Clojure 1.3 and below, :use :only is strongly encouraged. Bare :use 
>> is 
>> > almost never good. 
>> > 
>> > Justin 
>> > 
>> > On Thursday, November 8, 2012 11:57:21 AM UTC-5, David McNeil wrote: 
>> > > 
>> > > I notice the following item at 
>> > > http://dev.clojure.org/display/design/Library+Coding+Standards 
>> > > 
>> > >    "Be explicit and minimalist about dependencies on other packages. 
>> > > (Prefer the :only option to use and require)." 
>> > > 
>> > > The page was last edited on Mar 29, 2011 and ns usage has been 
>> discussed a 
>> > > fair bit since then... this leads to the question: 
>> > > 
>> > >    Is the item quoted above still the standard for Clojure Libraries? 
>> > > 
>> > > Thanks. 
>> > > -David 
>> > > 
>> > 
>> > -- 
>> > You received this message because you are subscribed to the Google 
>> > Groups "Clojure" group. 
>> > To post to this group, send email to clo...@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+u...@googlegroups.com 
>> > For more options, visit this group at 
>> > http://groups.google.com/group/clojure?hl=en 
>> -- 
>> Softaddicts<lprefo...@softaddicts.ca> sent by ibisMail from my ipad! 
>>
>
 

-- 
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

Reply via email to