3 ms·
I consider stability, consistency, and simplicity to be very important features for writing production code. While it's true that you can do a lot of the same t
by yogthos 7y ago
I consider stability, consistency, and simplicity to be very important features for writing production code. While it's true that you can do a lot of the same things you can do with ClojureScript in Js, the language and the ecosystem are vastly more quirky and volatile. I wrote regarding this in a bit more detail here [1].
As an example, my team has been using Reagent on the front-end for around 5 years now. We've never had to go back and change code to accommodate changes in ClojureScript or Reagent in that time. And we don't have to deal with stuff like JSX because HTML can be expressed using regular data structures. Things just work. Meanwhile, React itself has had many changes, and some of those are breaking.
I also find that tooling for ClojureScript is strictly superior. You get REPL driven development, reliable hot loading, minification, code pruning, and code splitting out of the box. All these things are difficult to do with Js, and don't work reliably with many NPM modules.
1. https://yogthos.net/posts/2013-08-18-Why-I-m-Productive-in-Clojure.html https://yogthos.net/posts/2013-08-18-Why-I-m-Productive-in-C...
- sdegutis 7y agoJS tooling has come a long way, and I've had pretty much all of these benefits by using Create-React-App within the past year. I don't remember ever needing to make project-wide changes because of an upgrade. It's also possible to avoid JSX completely, thanks to a library that uses JavaScript's template strings feature: https://www.npmjs.com/package/htm https://www.npmjs.com/package/htm
- yogthos 7y agoJs tooling might've come a long way, but it's still a huge and confusing mess. It's not even possible to prune libraries reliably when you're packaging the code. Meanwhile, ClojureScript compiler will automatically prune any unused code down to function level, and it provides predictable minifcation out of the box. You also don't have to deal with NPM which has a major vulnerability every few months.