Search code examples
clojurescripttranspiler

Did they use the clojurescript transpiler to transpile the transpiler?


I don't know how the "self hosted" clojurescript implementations like this and this are implemented.

However, given that the clojurescript compiler is written in clojure and it compiles clojure to javascript, I can reason that the clojurescript transpiler could theoretically transpile it's own source code to javascript, producing a clojurescript transpiler on the browser/node platform. I was just curious, is that feasible and actually how it's done?


Solution

  • Yes, your description sounds fairly accurate.

    Here is a post that provides some explanation:

    https://blog.fikesfarm.com/posts/2015-07-17-what-is-bootstrapped-clojurescript.html

    and a talk that covers some of the same subject, especially near the beginning:

    https://youtu.be/HnQ89r_dKEM