3 ms·
I am expecting the author to mention the single most important factor that worries most cljs users: the interfacing problem with other JS libraries that cause b
by leishulang 13y ago
I am expecting the author to mention the single most important factor that worries most cljs users: the interfacing problem with other JS libraries that cause by google closure compiler. But apparently he does not use other JS libs.
And yes, we need Closure advanced compiled mode when ClojureScript ships with a standard library nearly 7500 lines long.
- swannodette 13y agoInterfacing with other JS libraries isn't really a problem - that has been relatively pleasant for a long time now (:foreign-libs compiler option allows you integrate arbitrary JS libraries). Also note that the most popular JS libraries like Underscore.js and jQuery add little value to ClojureScript given the rich standard library and pure ClojureScript solutions like Domina. Integrating with functional frameworks like Angular.js isn't too painful as evidenced by Weathertron - http://keminglabs.com/blog/angular-cljs-weather-app/ http://keminglabs.com/blog/angular-cljs-weather-app/
- smrtinsert 13y agoNot sure what angular buys you when the power of clj is available - way too low level imo. I wouldn't mind a cljs version of seesaw though, I don't think something like that is out there yet.
- swannodette 13y agoWasn't advocating or not advocating Angular, just addressing the question of interop.
- mullr 13y agoAngular is still a nice way to do your DOM manipulation declaratively. https://github.com/pangloss/clang https://github.com/pangloss/clang extends angular to work with the the built in clojurescript data structures. Or https://github.com/zcaudate/purnam https://github.com/zcaudate/purnam has some angular helpers that work with regular javascript objects.
- coolsunglasses 13y agoGetting out of the insanely dumb naive DOM smashing pattern is more important than having macros in your frontend language. I am experimenting with Angular + ClojureScript via Clang right now, but if I am forced to make a choice between the two, ClojureScript isn't going to win and I do Clojure on the backend if I'm given a choice of what to use.
- leishulang 13y agosure there are many ways to make foreign lib works. I use externs.js to stop google closure compiler from changing my var names. but if clojurescript could make this kind of "hacks" integrated: i.e allow (:use [js/Foreign_lib :only lib.method]) instead of externs.js, then it will be way easier to attract newcomers. I agree that using google closure will save a lot of work, for now. But I also think that clojure guys should come up with their own(and better) compiler that has awesome compiled asm.js code as killer feature.