Comment made by: thheller
There was one more issue I discovered with my approach. My goal was to enable the Closure Compiler to eliminate the asserts when using :advanced compilation. This works perfectly fine with using a {{goog.define}} for * } but the compiler will complain if you try to adjust the define later since {{goog.define}} vars are not allowed to be adjusted at runtime.
(binding [*assert* false]
(something-that-asserts))
This works in CLJ but not in CLJS since * } is only checked at compile time. If compiled with {{:elide-asserts true}} you can't bind assert to true either since the code no longer exists.
So some compromise must be made either way, the best solution IMHO would be to have a goog.define which lets the compiler decide whether to eliminate the asserts or not, independent from the * } and then moving the assert check itself into js instead of the compiler.
Happy to write the patch if interested.