Fork me on GitHub

Is there a way for macros to expand such that they contain private vars, short of using #'?


I’m not aware of any way. (In fact in some ClojureScript core macros there is a bit of a hack to work around that in order to avoid unnecessary code bloat.


@mfikes OT, why ~js* over #'? I'm writing clojure, so I don't think I have an option, but I'm curious


Right, in Clojure, I’m not aware of such a workaround. (In Clojure, if pressed, I’d make a var public but name it something that indicates its private nature, maybe foo*) In ClojureScript, the use of var is problematic because it expands to a bunch of JavaScript. That’s arguably OK in many cases, but in those particular core macros, it is a hard pill to swallow, given the potential effect on generated code size.


(So, in those core macros it uses js* because it knows what it’s doing and that essentially emits the desired JavaScript—`js*` is used often in ClojureScript’s core macros.)


Dunno, perhaps something similar is possible via Java interop if you really really need to do it in Clojure.


That's very interesting. Very cool 🙂. I suppose that could easily become undone without knowing why it's like that :thinking_face:. I'm thinking I'll move the code to an impl namespace where it's public. This is the first time I've actually needed impl rather than just using it for aesthetic reasons.


@hiredman, it seems to be a hard incompatibility. I tried the example code from the front page and am getting random errors depending on what i change. the most recent is java.lang.NoClassDefFoundError: org/eclipse/jetty/server/NegotiatingServerConnection$CipherDiscriminator


i have jetty as a dependency and it was working just fine with ring-jetty-adapter


maybe, I doubt it has anything to do with being on windows though, I bet something is pulling in conflicting versions of jetty or something


okay. Ill be in dependency hell for a week or two then


ill let you know what i find


You may be able to get more information in #pedestal; the new maintainer regularly frequents the channel