Hacker News new | ask | show | jobs
by v0lta 4769 days ago
Can someone with some insight tell me what ClosureScript is exactly about, what it's for or if it's worth keeping an eye open for it? That would be great.

I did my own research but would like to hear one or two more opinions. Thank you.

3 comments

Like Scala/Clojure on the JVM, F#/ClojureCLR on .Net, or Coffeescript/Typescript on Javascript, it adds higher-level programming language semantics to programs running in a browser, NodeJS, Rhino, or any other javascript VM.

Features like namespaces, immutability, fast persistent data structures, and, if you are already using JVM Clojure in the same application, the Clojure language. Not to mention, the EDN data transport format, which means you can unify the server-side language, the client-side language, and the data transport format to Clojure (just like what javascript champions talk about with JS, JSON, and NodeJS).

ClojureScript is the Clojure language compiler that targets JavaScript. It compiles to Google Closure (not Clojure) JavaScript, but it can also target NodeJS. ClojureScript lets you use Clojure in the browser, adds Clojure data types to the JavaScript language, and allows for JavaScript to interact with the Clojure datatypes. Here's the side by side comparison https://himera.herokuapp.com/synonym.html

One of the most obvious additions to JavaScript is the ability to partition your JavaScript with namespaces.

ClojureScript is an implementation of the Clojure programming language that targets JavaScript. You can find out more about the Clojure programming language here: http://clojure.org