Enhancements:* inline source map information available to REPLs, enabled in browser REPL
----Groups "Clojure" group.
You received this message because you are subscribed to the Google
To post to this group, send email to clo...@googlegroups.comTo unsubscribe from this group, send email to
Note that posts from new members are moderated - please be patient with your first post.
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I'll let somebody else address the ns/macros stuff, but I can explain the #js data literal.
The idea is simple: JavaScript libraries make heavy use of JSON data, just like Clojure programs make heavy use of EDN data. Despite some similarity, ClojureScript does not make it easy to create JSON data. Calling JavaScript libraries from ClojureScript isn't quite as seamless as calling Java libraries from Clojure, since there is no shared interface for maps or sequences.
The #js data literals aim to make JSON *feel* more accessible from ClojureScript as the syntax level. This is accomplished by changing this:
(js-obj "arr" (array 5 10 15))
In to this:
#js {:arr #js [5 10 15]}
Notice: Only maps & vectors are supported. Map keys must be strings or keywords. The transformation is shallow, so you need the nested #js for the vector.
Yes.
More specifically, the reader produces instances of a JSValue type which wraps a vector or map, then the compiler treats them as a new kind of composite by evaluating the contained elements or values.
Could you provide examples of the second and third enhancements?
--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to the Google Groups "ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojurescrip...@googlegroups.com.
To post to this group, send email to clojur...@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.
Very cool.
So, just to confirm, you would need the following files in your example: foo/baz.cljs and foo/baz.clj.
Was there a rationale for leaving this transformation shallow?
-Tom
--
Note that posts from new members are moderated - please be patient with your first post.
---
You received this message because you are subscribed to a topic in the Google Groups "ClojureScript" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojurescript/mUVbtdnAvHA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojurescrip...@googlegroups.com.