是否可以使用:refer:all在ClojureScript:require? [英] Is it possible to use :refer :all in a ClojureScript :require?
问题描述
当我尝试编译它时,我得到:
clojure.lang.ExceptionInfo::refer必须后跟一系列符号:require
我在网上找到一些倾斜的引用,但没有在哪里阐明是否应该能够使用:refer :
如果我不能这样做,这个限制的原因是什么?
不,这是故意不可能的。最近与ClojureScript邮件列表相关的对话 :refer:all
,它似乎永远不会被支持。
这只是不好的风格,我知道在Clojure没有改变
的唯一原因是因为核心团队非常强烈的
在可能的情况下保持向后兼容性。明显缺乏
的裸体:在ClojureScript中使用是故意的。
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?
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.
这篇关于是否可以使用:refer:all在ClojureScript:require?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!