Clojurians
#cljs-dev
<
2017-01-23
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

mfikes01:01:26

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.)

mfikes01:01:49

If anything, I suspect such support would only be in a :cljs branch of code.

dnolen12:01:43

@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

mfikes12:01:24

Yes, the lack of uniformity bothers me

mfikes12:01:49

Maybe it is not worth it, presuming macros that take vars of macros are very rare

mfikes16:01:05

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)

dnolen16:01:27

@mfikes yeah I think so