Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 571
interstar Avatar asked Jun 28 '14 04:06

interstar


1 Answers

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.

like image 164
liwp Avatar answered Sep 23 '22 14:09

liwp