An Introduction to ClojureScript
There are many articles online explaining the benefits of ClojureScript. Some aggregated high level points are:
- Simplicity: In regard of the syntax, ClojureScript is a Lisp-based language that gives it a minimal syntax. It’s so minimal in fact that we’ll be able to cover it in this article. In addition to the simple syntax, ClojureScript also offers tools which help simplify asynchronous code.
- Safety: This means less bugs! ClojureScript and other functional programming languages have many properties that help reduce and mitigate common bugs.
- Performance: ClojureScript uses Google’s Closure Compiler. This allows ClojureScript to utilize dead code elimination and other features.
- Live Coding: The ClojureScript ecosystem provides many tools to do “live coding”. This means that once the code is changed, it’s instantly reflected in your live project. In this article, we’ll be looking at Figwheel so that you can better understand the concept.
- Code Reuse: ClojureScript can be run universally or, as many say, “isomorphically.” This means you can run the same code on your client and your server. This has become a popular pattern in the Node.js ecosystem. In addition, ClojureScript can import libraries from Node.js and Java ecosystems.
Setting up the Clojure(Script) Tool Chain
In this article, we’ll be installing the tool chain on a Mac OSX Environment. The ClojureScript wiki has guides for installing on other environments in case you need them. We’ll need a few system dependencies to get started. One of these is Homebrew, the popular OSX package manager.
Continue reading %An Introduction to ClojureScript%