On Tuesday, March 24, 2015 at 10:31:00 PM UTC+11, David Nolen wrote: > On Tue, Mar 24, 2015 at 3:57 AM, Mike Thompson <[email protected]> wrote: > > > The Google Closure compiler does deadcode eliminate the "x" if you do it this > way. And it avoids the complete nightmare of getting a type hint added to > js/goog.DEBUG through a macro (which seems impossible to me). > > > I just tested the approach that I suggested and verified it works the same as > it does in Clojure. > > > > (defmacro when-debug [& body] > `(when ~(vary-meta 'js/goog.DEBUG assoc :tag 'boolean) > ~@body))
Many Thanks! That works. Phew, thank goodness. I can now see that your original code had "assoc" "name" incorrectly transposed and that, combined with my rookie macro-debugging-skills, meant a lot of thrashing about, wild tangents and hair pulling. I can't wait to get better at this stuff. -- Mike -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
