by mkremins · 12y ago · 0 comments
(:require [foo :as f])
gives the required namespace a short alias with which symbols defined in that namespace can be qualified, while (:require [foo :refer [bar baz quux]])
explicitly provides a set of symbols to import unqualified.Generally speaking, :require :refer :all is also considered non-idiomatic. In fact, ClojureScript has explicitly avoided supporting both :require :refer :all and naked :use [1]. Backwards compatibility seems to be the only reason either is still supported by Clojure on the JVM.
[1] https://groups.google.com/forum/#!msg/clojurescript/SzYK08Od...
I guess a popular example is `(:use clojure.test)`
(:use clojure.test) is probably a worthy exception – 90% of the time I see :use in the wild, it's in exactly that context :)