r/Clojure • • Jun 26 '23

A case for ClojureScript 2.0

https://tonsky.me/blog/clojurescript-2/
82 Upvotes

25 comments sorted by

View all comments

14

u/maxw85 Jun 27 '23

/u/thheller is doing a fantastic job with shadow-cljs and we are so thankful that this tool exists. We never have issues with the :advanced compilation. Also in many other ways shadow-cljs protect us from dealing with the complexities of the JS monster.

In general I find it very challenging to keep up with the developments in the JS ecosystem. Node vs. Deno, Cloudflare Workers vs. Deno Deploy, React vs. Svelte, yarn vs. npm, NextJS vs. Remix etc.

When you build your own (SaaS) business, time quickly become your most valuable asset and the scarcest resource. Therefore we started to build the less sophisticated parts of the app on the server with the help https://htmx.org/ Only the very interactive parts of the web app will stay in the ClojureScript land. While we are happy to avoid the complexities of a SPA for the other parts.

5

u/noprompt Jun 27 '23

We never have issues with the :advanced compilation.

Yet many do. I've had plenty over the years across several projects and the experiences have been pretty bad.

Also in many other ways shadow-cljs protect us from dealing with the complexities of the JS monster.

Eh, I dunno man. I used ClojureScript for about 8 before going back to JavaScript. When ClojureScript first came out it was offering a comprehensive suite of clear benefits that was worth the cost of picking up the language and its quirks. Today, those costs are not as justified because the JavaScript ecosystem has strong, high quality offerings.

6

u/dustingetz Jun 29 '23

did your cljs usage predate shadow? shadow made a lot of cljs issues just go away. In addition to making most extern problems go away, another big shadow win is that the cljs repl is usable.

3

u/noprompt Jul 01 '23

No. I’ve used shadow too. Last time was about a year ago. It’s definitely better than stock CLJS. The REPL experience was inconsistent and unreliable so I stopped using it. I had some other issues with shadow at some point and found myself in the docs trying to figure out what obscure configuration button I needed to press. At that moment my enthusiasm for ClojureScript died. But, to be fair to shadow, there were many years of bad experiences prior. Shadow just happened to be the last straw.