clojure - Is there an if-clojurescript macro? -


is there macro clojure , clojurescript allow insert different expressions depending on whether file being compiled in clojure or clojurescript?

(if-clojurescript    (my clojurescript definition)    (my clojure definition)) 

essentially i'm looking #ifdef some_platform macros might see sprinkled around c++ code. think useful files part of cross-over, 1 small part of file isn't compatible between clojure/clojure-script.

this new feature clojure 1.7 : reader conditionals.

also see daniel compton blog, example :

#?(:clj  (clojure expression)    :cljs (clojurescript expression)    :clr  (clojure clr expression)) 

you may want @ macrovitch.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -