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


I think I have discovered an interesting optimization: When @domkm requested proper dead code elimination in cljs-devtools, I got burnt by the need to explicitly specify (if ^boolean js/goog.DEBUG …) hint to get :closure-defines working under :advanced build[1]. It was unexpected to me that closure compiler cannot see that optimization and does not inline truth test for js/goog.DEBUG “constant”. So I started poking around and found a way how to aggressively inline checked truth checks in a compatible way (I believe). I also believe this could potentially open optimizations in other places. I think we should explore @nosideeffects annotation[2] and tag core functions where appropriate. [1] [2]