3 ms·
> ClojureScript offers features like dead code elimination In Clojurescript, it's my opinion the Closure compiler is of dubious value. It adds yet another lev
by jgalt212 10y ago
> ClojureScript offers features like dead code elimination
In Clojurescript, it's my opinion the Closure compiler is of dubious value. It adds yet another level of indirection between the source and the target. And isn't it the dead code elimination that makes run time macros impossible in CLJS? They are possible in Clojure proper.
- bad_user 10y agoFor runtime macros you need to also load the CLJS compiler in your app, which is heavy and overkill in the context of JS apps. Even so, embedding a CLJS compiler in your app (and hence runtime macros) is possible.
- jgalt212 10y ago> For runtime macros you need to also load the CLJS compiler in your app, which is heavy and overkill in the context of JS apps. I agree, but with code splitting this could be done with 0 overhead for most use cases.
- _halgari 10y agoCLJS has been self hosted for about a year now. It's cool, but its really not needed. Google Closure on the other hand is amazing. I've seen speed improvements of 10x when switching to advanced compilation mode. Its not just dead code elimination, its also partial evaluation and inlining.