DEV Community

Andreas Rein
Andreas Rein

Posted on

The ClojureScript experience from a beginners perspective

A quick look into the ClojureScript ecosystem and a starting guide for developers interested in ClojureScript.

Learning

There are many online resources to learn Clojure and ClojureScript. I think the best one is clojureacademy. This is very much like codeacademy. A highly interactive learning environment. The downside is that it only contains courses on Clojure and not particular ClojureScript.

A thing I noticed reading through the official documentation and third party packages documentation is that the language is more flamboyant than I’m used to. Are there anyone else that has noticed that?

Tutorials

Documentation

Workflow

The workflow is not as fluent if you are coming straight from the web world of webpack and NPM. ClojureScript runs on the JVM and the startup is rather slow. When it’s up and running there are however no problems. It still feels sluggish and kinda weird to work on the JVM while building an SPA for the web for me. Figwheel (ClojureScript’s live reloader) is really a must and it works flawlessly as well.

Where ClojureScript really shines is the REPL capabilities. This is a powerful feature and invites you to try, test and learn.

Clojure tools

Third-party packages

It seems like in the ClojureScript's community there are a lot of highly skilled developers. There are not a whole lot of packages but most of them are of quite good quality. As a beginner, I found the documentation on some of them rather lacking.

You can also use third-party javascript libraries, either through CLJSJS or including it in your build process.

Tooling

Clojure tooling

  • Atom
    • Can be quite good with plugins (Parinfer, atom-parinfer, lisp-paredit)
    • Not a good out of the box experience
  • Cursive
    • Cost $199 for a commercial license
    • Great code completion, REPL, and debugger
    • IntelliJ plugin
  • VSCode
    • Can be acceptable with plugins (Vs-code-parinfer, vscode-clojure-debug)
    • The plugins is still immature
  • Light Table
    • First class support for ClojureScript (Light Table is built into it)
    • Many plugins
    • Sluggish performance and not completely bug-free
    • Development seems to have stagnated
  • Emacs
    • The most popular choice
    • Many plugins
    • Steep learning curve
    • Keyboard based workflow
  • Nightlight
    • Runs inside your project
    • Basic editor functionality
    • REPL, code completion, and instaREPL
  • Nightcode
    • Simple IDE for Clojure(Script)
    • Easy to get started
    • Web-based version is also available
  • Vim
    • Quite a popular choice
    • Keyboard based workflow

ClojureScript's tooling is weak compared to other languages. The best ones after my short period of testing are undoubtedly Emacs, Cursive, and Atom. There are other good ones like nightlight and nightcode but they are quite simple in terms of functionality.

Conclusion

I believe ClojureScript still have some work to do so it will be more inviting to learn for web developers that usually work with React, Vue or Angular. The tooling support is a must since most programmers have a favorite editor and it takes time to get comfortable with an editor. The documentation is quite good but still not there yet.

The pics is taken from the State of Clojure 2016 survey

Top comments (0)