Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This seems like such a huge win, I'm it's not more common with other compile to js languages.


It's not so common because:

- It requires a running JVM to compile it all down (not a bad thing).

- Can take upwards of a second to compile depending on code base size and compression setting (even if the JVM is warm).

- Kills all ability to debug. Looks like "a.call().call()" etc.

That said, ClojureScript has been fun to work with, but IMO, Google Closure as dependency thwarts a lot of people looking to try it out like they might try CoffeeScript or TypeScript.


http://cljsfiddle.net/ goes a long way towards having a tool people can just play with to try out ClojureScript without being twarted by setting up Clojure/JVM/Lein/Lein-cljsbuild/


Maybe I'm a bit of a masochist, but it's not that hard to read the compiled output, especially when you have a decent mental model of what it should be. It doesn't look like idiomatic javascript, but the structure is pretty regular.

Here's an example for the kids at home.

compiled: https://github.com/gtrak/node-cljs-template/blob/master/src/...

from: https://github.com/gtrak/node-cljs-template/blob/master/src-...


i m certain you can pretty print the resulting compiled js. see http://googleclosure.blogspot.com.au/2010/10/pretty-print-ja...


and don't forget source maps




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: