2013/8/2 Anthony Grimes <disciplera...@gmail.com>:
> Keep in mind that you should almost never do this. It's much better to
> require :as or explicitly refer which things you want from each namespace.
> When you do :refer :all, you pollute your namespace with tons of vars and
> when you use them, nobody has any clue where they're coming from so they
> have to hunt through the codebase, your libraries, etc, to find out where
> the various vars you're using come from. All of that is mitigated by
> referring specific vars or qualifying the namespace with :as. It really
> isn't that many more characters. You can give your namespace a one letter
> prefix and access vars like x/some-var.

True.

Tho note that with an IDE (Counterclockwise for Clojure does that for
instance) with good integration with nrepl, you can hover over the
symbol (provided that you've successfully loaded the namespace in your
repl) to see documentation (including where it comes from), type F3 to
jump to its definition (either in your project files, or in jar
entries).

>
>
> On Thursday, August 1, 2013 1:19:28 AM UTC-7, Yoshinori Kohyama wrote:
>>
>> Hi group.
>>
>> Assumed that I want to refer 'baz, 'qux and etc and don't want to refer
>> 'quux of 'bar namespace within my 'foo namespace.
>>
>> With 'ns' macro, I can require a namespace and refer all public symbols in
>> it.
>>
>>   (ns foo (:require [bar :refer :all]))
>>
>> I can refer only some specific symbols.
>>
>>   (ns foo (:require [bar :refer (baz qux)]))
>>
>> Can I refer all but specific symbols?
>>
>> I'm doing
>>
>>   (ns foo (:require bar))
>>   (refer 'bar :exclude '(quux))
>>
>> or
>>
>>   (ns foo)
>>   (require 'bar)
>>   (refer 'bar :exclude '(quux))
>>
>> for now.
>>
>> Thanks in advance.
>>
>> Y. Kohyama
>>
> --
> --
> 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.


Reply via email to