4 ms·
Thanks; great response. I had forgotten about crossovers. I did a little project in CLJS and found the additional power of the language nice, but not revolutio
by graue 13y ago
Thanks; great response. I had forgotten about crossovers.
I did a little project in CLJS and found the additional power of the language nice, but not revolutionary. I've found getting into Node.js that despite the well-known warts of JavaScript, the community has done an amazing job working around those problems, building powerful abstractions, and shipping simple, un-complected code. I hardly feel like I'm compromising on expressivity.
So for me, language like "callback hell" and "wasteful" rings a bit hollow, as it doesn't reflect my experience writing JavaScript. In fact, if I were a contributor to When.js I could imagine it being pretty insulting.
Maybe we can win more people to ClojureScript by recognizing, not diminishing, the great stuff folks have made with vanilla JS, and showing how CLJS provides interop while making JavaScript programming even better. Kevin Lynagh's post here[1] is a nice example of that.
[1] http://keminglabs.com/blog/angular-cljs-weather-app/ http://keminglabs.com/blog/angular-cljs-weather-app/
As for my "glass is half-empty" interpretation of code-sharing, I'm thinking of how you can trivially require jQuery from a Node.js application and use it for scraping[2]. Or how you can require('http') in the browser and effortlessly make HTTP requests in browser or server with the same code[3]. I'd love to be proven wrong, but ClojureScript seems far away from this kind of stuff. You can't use Compojure or HTTP-Kit in ClojureScript. So you could say that while Clojure has a decent client/server code-sharing story, there's this other thing, JavaScript, that has an amazing one.
[2] http://blog.nodejitsu.com/jsdom-jquery-in-5-lines-on-nodejs http://blog.nodejitsu.com/jsdom-jquery-in-5-lines-on-nodejs
[3] https://github.com/substack/http-browserify https://github.com/substack/http-browserify