Bonus Track (K)
Session type: Bonus
Jim Barritt – Bring the power of Clojure to your browser app – Live Blog 2015
Jim Barritt has been writing code for many years. He is currently a Principal Consultant for ThoughtWorks. His passion is the code and systems architectures, helping teams deliver reliably and rapidly. You can catch up with jim on Twitter.
Note: This is primarily a code demo session.
Today we are looking at Clojure Script to React.js compilation.
Clojure meets its goals by: embracing an industry-standard, open platform – the JVM; modernizing a venerable language – Lisp; fostering functional programming with immutable persistent data structures; and providing built-in concurrency support via software transactional memory and asynchronous agents. The result is robust, practical, and fast.
There is the same awesomeness in the chome console that you would expect from standard JS. It even highlights syntax errors. Very handy.
The ClojureScript hello world is as follows:
(ns hello-world.core) (enable-console-print!) (println "Hello world!")
This declares the namespace and prints to the console.
Unlike vanilla js, Clojure applies structure to JS similar to CoffeeScript / Dart. This helps reduce the difference between members code, increasing readability.
It encourages coding of UI’s rather than templating.