Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition: no naked use or require/refer-all #16

Open
CampingScorpion opened this issue Jan 5, 2013 · 4 comments
Open

Addition: no naked use or require/refer-all #16

CampingScorpion opened this issue Jan 5, 2013 · 4 comments

Comments

@CampingScorpion
Copy link

No description provided.

@bbatsov
Copy link
Owner

bbatsov commented Jan 8, 2013

Will do.

@CampingScorpion
Copy link
Author

That said, as Technomancy pointed out, it is pretty standard to test files naked using or require/referring clojure.test and the ns under test. Maybe we could mention that in the style guide.

@tendant
Copy link

tendant commented May 17, 2014

Prefer using :require :refer :all over :use in ns macro.

:refer :all is better than :use. However it is even better using refer explicitly like :refer [func-name].

I would like to suggest change it to

Prefer using :require :refer [func-name], in case of referring to all functions in a namespace, use :require :refer :all, instead of :use.

@film42
Copy link

film42 commented Aug 9, 2014

But is there a solid argument to using :require :refer :all over :use? I mean, if they do the same thing, :use seems more readable.

Definition of use calling to refer:
https://github.com/clojure/clojure/blob/43cc1854508d655e58e377f84836ba128971f90c/src/clj/clojure/core.clj#L5727-L5736

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants