4 ms·
By the way, Clojurescript is one of the greatest tools I've ever experienced in the software industry. And it is maintained by a real smart guy that gets paid b
by hellofunk 9y ago
By the way, Clojurescript is one of the greatest tools I've ever experienced in the software industry. And it is maintained by a real smart guy that gets paid by Cognitect to work on it. Isn't this a case of Cognitect spending money to improve free tools for the world? Which is the opposite of the original article's accusations?
- bpicolo 9y agoAgreed - Clojurescript is a ton of fun on the frontend!
- saosebastiao 9y agoMaybe it has gotten better in the last year or so, but I’ve been extremely disappointed in a) the scope of semantics divergence between Clojure and clojurescript, and b) the performance of clojurescript for anything larger than toy examples. After reading a blog post about scalajs[0], I came away pretty convinced that battle would be uphill. It’s just too hard to replicate one dynamic language’s semantics in another dynamic language without embedding huge and slow runtimes along with it. [0] http://www.lihaoyi.com/post/FromfirstprinciplesWhyIbetonScalajs.html http://www.lihaoyi.com/post/FromfirstprinciplesWhyIbetonScal...
- hellofunk 9y agoI don't know what problems you were having, but the performance has been extraordinary for the enterprise app that I work on (now 3 years old). In fact, the product would not even exist without the tools clojurescript brought to the table. I don't know what you mean when you say the semantics are different between the two versions of the language, they really have the same overall design and I feel like I'm working in the same language when I switch between them.
- virtualwhys 9y agoLooks like you forgot to link to the Scala.js blog post. FWIW, as a Scala.js user the combination of Bucklescript + Reason ML looks pretty compelling: static types and lightning fast build times. Haven't used Clojurescript but I'd imagine the code-change-reload cycle is quite fast compared to Scala.js, which while absolutely excellent in many ways, suffers from the dog slow compiler that is scalac (Scala collections blowing up generated binary size is the other drawback that comes to mind).
- saosebastiao 9y agoSorry abou that, just added it.
- hellofunk 9y ago> the code-change-reload cycle is quite fast I work on a 20K line enterprise CLJS app. Due to incremental compilation where only recent changes need to recompile during development, each code change (meaning, saving some source files) is on average 1 second of recompilation. With the Figwheel tool, there is no manual reload required, as it automatically refreshes the browser to reflect your most recent change.
- virtualwhys 9y ago> each code change (meaning, saving some source files) is on average 1 second of recompilation. That's actually fairly slow, I'd expect pretty much instantaneous (hot reload is nice though). The overhead of Bucklescript, for example, is at most in the 10s of ms for code changes (saw a 2017 Strange Loop talk where the presenter claimed 200ms to compile the entire project). Scala.js is around 2 seconds for shallow changes (affecting only one source file), which over time is a productivity drain, those seconds add up when doing front end work.
- hellofunk 9y agoAlways wanted to try bucklescript. Even has built-in persistent data structures, which is a win over purescript.
- Naomarik 9y agoYour claims are baseless. If there are any semantic differences between clojure and clojurescript they are so minute that I'm not aware of them. I'm a full stack developer and use both daily. There are no performance issues inherent with using clojurescript either. I say this having made a non trivial UI and pushing loads of data through it and seeing what everyone else has made. Check out precursor app.
- darksaints 9y agoThere is a significant amount of divergence in semantics. I’m not sure why you would try to convince anyone otherwise...the clojurescript developers acknowledge this completely upfront. https://clojurescript.org/about/differences https://clojurescript.org/about/differences In my experience, all of the stated benefits of clojurescript become more and more tenuous as your intensity of use increases. Hello world seems fantastic, todomvc still seems pretty cool, but by the time you’re doing full size apps of meaningful complexity, you really start to see the limitations. In order to get any meaningful performance out of it, I ended up having to rewrite and experiment like crazy...the code looked like nothing I would have written in Clojure, using completely different idioms and data structures. And while the prototyping was fast, in the end it took me far longer to write and then iteratively optimize than it would have to write an equivalently fast version in scalajs or typescript. Maybe your experience is different, but my experience is my experience, and it most definitely is not baseless.
- Naomarik 9y agoI've never had to make a context switch between clojure and clojurescript. If differences in semantics means I have to change how I think about solving the problem at hand, then that has been pretty much non existent in my experience. Of course with one you have browser APIs and the other is java, but when it comes to building up and transforming datastructures everything I've been doing works the same on both. This is also why most the time you can just tack on a "c" on the extension and you have something that works on both clojure and clojurescript. Performance is not an inherent problem of clojurescript. It was just the way you coded you prototyped your app. Your experience is valid but don't blame the problem on the tool when it was the way you solved your problem before you optimized it. I absolutely mean no disrespect to you but I don't want your comment to dissuade others from trying out what has essentially been a utopia for me. It has allowed me to build non trivial webapps without having any familiarity with functional programming or lisp. The feedback loop is so damn tight that I was productive without knowing much of anything. But maybe that's okay. If the everyone else is constantly updating their build tools to every flavor of the month and having to learn new versions of javascript, that gives the few of us who are mastering clojure/script a bit of an advantage.