3 ms·
No, ClojureScript does not interpret ClojureScript at runtime. The Clojure forms are compiled down to JavaScript directly. More info at http://blog.fogus.me/201
by fogus 14y ago
No, ClojureScript does not interpret ClojureScript at runtime. The Clojure forms are compiled down to JavaScript directly. More info at http://blog.fogus.me/2011/07/21/compiling-clojure-to-javascript-pt1/ http://blog.fogus.me/2011/07/21/compiling-clojure-to-javascr...
- kibwen 14y agoI wonder if his figure is simply mistaken, then. Because 100 kilobytes is a heck of a lot of code for a hello world. The compiled representations in your blog post seem far more reasonable.
- fogus 14y ago100K is a lot of code for a Hello World, so don't use ClojureScript to write Hello World apps. The cool part is that building a largish app will not necessarily grow the output JS.
- kibwen 14y agoSure thing, but my curiosity still stands. :) If you're using Closure Compiler to perform dead code elimination (100kb is the "heavily optimized" number, as far as I can tell), how is it that `console.log('hello, world!');` requires 100kb of essential (non-eliminatable) scaffolding?