On Sun, Jul 24, 2011 at 11:19 AM, James Keats <james.w.ke...@gmail.com> wrote: > > Google Closure is too Java. It's not idiomatic JavaScript. I find it > disappointing that rather than porting from a functional language like > Clojure straight to another functional language like Javascript, the > google closure with its ugly Java-isms is right there obnoxiously in > the middle.
It is interesting to me that you say this, because it's an argument I've used against other JavaScript libraries. In particular I think Zimbra is weak in this way. For a specific example, to register an event handler using the Zimbra event system, you can't just pass in a function, you have to pass in an instance of an AjxListener. This definitely strikes me as a useless Java-ism. The G. Closure library doesn't have that particular problem -- it's clearly aware that functions are first-class objects in JavaScript and takes advantage of that fact. Is there some other specific way in which the G. Closure library is too Java-like? How does that specific way actual harm the development process or the final product? > Then, there's the elephant in the room, and that elephant is Jquery. I like jQuery. It's a huge win compared to vanilla JavaScript for the browser. Now, I personally plan to write my ClojureScript code to target the G. Closure library and then run it through the advanced-mode G. Closure compiler, but there's no reason *you* have to. You argue elsewhere that the G. Closure compiler is unnecessary (citing streaming HD video in comparison to minified JavaScript) -- if you don't use the compiler (or use it only in simple mode) you should have no problem using jQuery. Your resulting .js will be quite a bit larger because you'll have a couple of the G. Closure library files that ClojureScript itself uses, but nothing compared to streaming HD video. So, you could use ClojureScript and jQuery to write a snappy little demo and prove to everyone the value of that approach. I'm sure I'm not the only one that would be interested in seeing such a demo. --Chouser -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en