4 ms·
How do I [intelligently] choose ClosureScript over say, Node.js?
by jsavimbi 15y ago
How do I [intelligently] choose ClosureScript over say, Node.js?
- swannodette 15y agoYou don't have to choose one or the other. You can target Node.js with ClojureScript.
- rgbrgb 15y agoBut then you're missing one of the best features of developing with Node.js (one less context switch).
- fogus 15y agoWhich is a likewise reason for using Clojure in the client and server passing Clojure between the two.
- jsavimbi 15y agoWhat I meant to say is "based on ecosystem, performance, scalability and learning curve, is there a compelling argument that would convince me to change from my current language/framework/platform to this one?"
- lukev 15y agoFor the server side, Clojure, by most metrics, would beat node.js by virtue of running on the JVM and its stellar concurrency capabilities. This includes ecosystem, performance and scalability. Using ClojureScript in the browser gives you a language to use that's consistent with what you're using on the server, and easy interop (you can just send data back and forth directly, without having to do any extra serialization). It's also (in my opinion) a much better language than JavaScript. Learning curve is the one likely stickler - depends how inclined you are to learn a Lisp. Personally, I love it.
- rgbrgb 15y agoThis is definitely a question worth asking. I think the audience ClojureScript is most appealing to is those who are already writing server-side stuff in Clojure and want to have a consistent front end or "old-school Lisp hackers" who are now writing web applications. Personally, I'm attracted to Lisp/Clojure because of its AI history but haven't put the time in to build anything real with it yet. Are there people who have switched away from (Node || Python || Ruby) && JS who could discuss their experience?
- jshen 15y agoI've done Ruby for years and I've written one large commercial project in clojure. Clojure was great, and I would love to use it more, but I haven't been able to convince people to use a lisp. It's very strange actually, I tried really hard to do a small project in clojure at my current job and got resistance from everyone. These same people were happy to try coffee script, scala, golang, etc, etc. There seems to be a true bias against lisps.
- phren0logy 15y agoThat's really interesting to hear a real-world example. Can you say more about the reasons they gave you?
- jshen 15y agoThe contexts are all different. A VP told me that he had a bunch of mediocre programs and it would be hard from them to use it, and hard to hire new programmers. A friend of mine who tries new languages all the time simply doesn't like it cause it's a lisp. A Director at a different company didn't say clearly, but it seemed to boil down to it being a lisp. H was fine with us trying Scala or even golang, but no clojure.
- jcromartie 15y agoPeople see parens and freak out. I once interviewed a guy who said his least favorite language was Lisp. I didn't know it was at the bottom of anybody's list!
- lukev 15y agoYou have to start by comparing apples to apples. ClojureScript is a programming language which compiles to JavaScript, Node.js is a runtime platform which executes JavaScript. So in this case you can actually use both.