This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-23
Channels
- # arachne (3)
- # aws (1)
- # bangalore-clj (2)
- # beginners (19)
- # boot (151)
- # cider (72)
- # cljs-dev (9)
- # cljsjs (7)
- # cljsrn (37)
- # clojure (215)
- # clojure-austin (1)
- # clojure-denmark (2)
- # clojure-dev (68)
- # clojure-india (1)
- # clojure-ireland (2)
- # clojure-italy (4)
- # clojure-mke (1)
- # clojure-nl (4)
- # clojure-russia (4)
- # clojure-serbia (1)
- # clojure-spec (29)
- # clojure-uk (23)
- # clojurescript (23)
- # cursive (24)
- # datomic (71)
- # emacs (5)
- # events (1)
- # gsoc (11)
- # hoplon (20)
- # klipse (4)
- # lambdaisland (2)
- # leiningen (3)
- # luminus (3)
- # off-topic (30)
- # om (40)
- # om-next (1)
- # onyx (15)
- # pedestal (19)
- # perun (7)
- # planck (23)
- # proton (1)
- # protorepl (2)
- # re-frame (35)
- # reagent (21)
- # ring-swagger (38)
- # rum (19)
- # spacemacs (9)
- # untangled (11)
- # vim (5)
- # yada (4)
In Clojure, it is legal to take the var of a macro sym, using it in a construct like
(defmacro my-or
[& args]
(apply #'or &form &env args))
Self-hosted CloureScript can consume such a macro with a little help with resolution:
(defmacro my-or
[& args]
(apply #'cljs.core$macros/or &form &env args))
I’m wondering if there would be any negative consequences if the compiler resolved things like #‘or
. (Wanted to mention here first before JIRA.)FWIW, here is the real-world context where such a thing came up: https://github.com/clojure/core.rrb-vector/blob/master/src/main/cljs/clojure/core/rrb_vector/macros.clj#L7-L9
@mfikes that’s interesting, I don’t immediately see a problem with that - though enabling things that can’t work in regular ClojureScript always gives me pause
FWIW, for the specific motivating issue above, I’ve submitted a patch to core.rbb-vector
to instead use splice. This would collapse the problem down to “macros namespaces in bootstrapped ClojureScript must be compilable as ClojureScript.” Perhaps that is a better solution than an asymmetric revision to the compiler for this corner case. (http://dev.clojure.org/jira/browse/CRRBV-16)