Has anyone mixed clojurescript with cherry in production?
ClojureScript depends on javascript which can pull the rug at some point, considering the rate of change in javascript.
The rug pull will collapse the entire clojurescript ecosystem.
The churn in the JS ecosystem is more on the Node.js libraries side, not the JS side. The core web technologies (HTML, CSS, JS, web/browser APIs) bend over backwards to maintain backwards compatibility.
The React-based CLJS libraries (Re-frame, Reagent, UIx) are the only prevalent CLJS libraries I'm aware of with a hard dependency on a Node.js library. At worst React does something to make those libraries unservicable, but the core of CLJS is well insulated against the Node.js library churn.
I think reagent is based on react? Re-frame relies on reagent for reactivity. Siframe tries to make re-frame independent of reagent.
I didn't like how clojurescript requires externs.
@amano.kenji are you aware of shadow-cljs?
I'm aware that shadow-cljs takes care of externs to a degree. However, I think clojurescript will not last very long.
shadow-cljs's :target :esm and :target :esm-files and annotating the few variables the compiler can't autoinfer with ^js takes care of most of this, externs aren't something I have issues with basically ever
The Closure compiler is still much more powerful than the JS tool chain particularly around minification and tree shaking so ClojureScript isn't going away anytime soon
honestly I don't know if this is a good idea since you will have two copies of the CLJS standard library around (if you are using cherry from npm).
you can embed cherry in a ClojureScript application to dynamically evaluate ClojureScript though, but it's a different use case: https://github.com/squint-cljs/cherry/blob/main/doc/embed.md
mixing squint with ClojureScript maybe makes more sense since squint has very low overhead
I think cherry should be funded by someone so that we can work with es6 modules and ditch awkward externs.
Does Cherry have issues with ES6 and externs? I thought that was CLJS instead.
fun fact: cherry and squint are built using shadow-cljs ;)