4 ms·
Ask HN: Is there a business case to be made for ClojureScript?
I work primarily with Javascript (React client-side, Node server-side). I've enjoyed the brief time I've spent with Clojure/ClojureScript (as well as other functional languages like Elixir). However, the chance of my current workplace (or many future workplaces) adopting an esoteric language like Clojure/CLJS is very low without a strong business case.
Unfortunately, whenever I try to think of cases for ClojureScript that aren't handled acceptably by Javascript/CoffeeScript, I come up empty. Can anyone on HN recommend any resources, or provide some concrete examples of CLJS value-adds that Javascript can't compete with?
- empthought 11y agoA strong business case is already having an existing piece of critical code that is implemented in CLJS. It's why Objective-C is still a thing. So if you want to use it, just implement something with it and see what happens. There are two negative outcomes and one positive one: - you could get fired (in which case it's a pretty bad job that affords you no latitude) - you have to rewrite it in JS (you would have had to anyway, apparently) - or they'll say "Looks great, keep it running, maybe other people can try out this CLJS thing too." As far as objective argument for the setup's superiority, there is none. Software has an embarrassment of riches with regard to capable tools; ClojureScript and JavaScript are both capable tools.
- raspasov 11y agoClojure/ClojureScript are fundamentally simpler (better) languages than Java/JavaScript respectively. Given idiomatic usage, the result in more concise, understandable code which allows greater flexibility of any product's road map. The ability to change and adapt (flexibility) is one of the most essential qualities a business organization should have. There is your business case : )
- emidln 11y agodefmulti/defmethod is a much cleaner way of handling dispatch on the typical message buses you see in JS than anything js provides. This speeds development and lowers maintenance (the bulk of time spent in a typical business application). core.async makes working with UIs much easier to reason about. It's a more robust solution to the space than promises. If the page/app is standalone, cljs is often a considerable size savings thanks to the google closure compiler's optimizations than what is typical of a jquery (or similar page). This means less to download which can be a big deal on mobile (although if this is truly your problem, the solution might not actually be clojurescript as much as not using giant frameworks in general). It's also fun for developers. Unhappy developers are developers that are one foot out the door.