Is it possible to use :refer :all in a ClojureScript :require?

8k Views Asked by At

I'm just trying out ClojureScript, starting out by converting something I wrote in Clojure into cljx.

When I try to compile it I get:

clojure.lang.ExceptionInfo: :refer must be followed by a sequence of symbols in :require 

I'm finding some oblique references online, but nowhere where it's spelled out whether I should be able to use a :refer :all in a ClojureScript program.

If I can't do it, what's the reason for this restriction?

1

There are 1 best solutions below

3
On BEST ANSWER

No, it's intentionally not possible. There was a conversation on the ClojureScript mailing list recently related to :refer :all and it looks like it will never be supported.

To quote David Nolen from that thread:

It's just bad style and as far I know the only reason it hasn't changed in Clojure is because the core team is very adamant about preserving backwards compatibility when possible. The conspicuous lack of naked :use in ClojureScript was intentional.