4 ms·
I'm a seasoned Javascript dev. I started using ClojureScript in January 2015 (switched from CoffeeScript). I have almost no experience with Java and JVM. Also I
by dr_win 11y ago
I'm a seasoned Javascript dev. I started using ClojureScript in January 2015 (switched from CoffeeScript). I have almost no experience with Java and JVM. Also I have not done anything in Clojure yet and nothing meaningful in Node.js.
Did one SPA to learn ClojureScript and explore the landscape of ClojureScript libraries and web frameworks, Om in particular:
https://github.com/darwin/faceboard https://github.com/darwin/faceboard
I love the language. Its minimalism especially. I can use it everywhere where Javascript can be considered. For me this is another JavaScript language upgrade - much more significant than going from plain Javascript to CoffeeScript. I feel sorry that I have not discovered power of lisp earlier in my career.
The community around ClojureScript is still pretty small, but it is a fruitful ground for new ideas. Over last few months I've learned a lot. The value of immutability, many functional patterns, thinking in pure functions (that includes designing idempotent UI components thanks to React.js). The language is easy, but exploring and practicing those thinking patterns takes time. I feel that I'm still pretty much at the beginning, but I think it was worth it for me.
If I'm going to use this language for next few years I want to invest into improving tooling around it. Beside cljs-devtools also started working on structural code editor in ClojureScript, it is an experiment right now, but in the long term it has an ambition to compete with LightTable:
https://github.com/darwin/plastic https://github.com/darwin/plastic
The switch was pretty easy for me. I don't work in a team and I tend to work on experimental projects, so I don't have to persuade coworkers to try something new and I can take risks. And btw. I hack on Objective-C stuff for living. Made TotalFinder and TotalTerminal.
And to finally answer your question:
> How sane would it be to go full nodejs/CLJS instead of nodejs/JS?
This is the default route for me now. And I hope it is sane. I see CLJS as an upgraded Javascript. Interoperability is not an issue. It is no problem to use existing JS libraries from ClojureScript and/or expose ClojureScript functions back to JavaScript. The issue could be that you don't get many contributions from JS devs in case of open-source. Also there could be performance implications. But you can always drop back to Javascript for performance critical code if needed. It would be just more work and dirty experience :) Also tooling and community support can be a consideration. If you are experienced in Javascript, in case of troubles you can definitely help yourself. But for beginners or intermediate people I can imagine looking for help could be a struggle. Javascript community is much bigger and had time to evolve tools or there is good incentive for other people to build good tools for this large community. With ClojureScript we have to wait few more years or better help make it happen.