Hi all, I'm working on CLJS symbol resolution for Cursive. There are a lot of corners where it's hard to figure out from the doc how they should work - I've looked through the code but I'm not sure I've got it all right.
1. I've seen several times in the group here that / should only be used for CLJS namespaces, never for JS properties. So (Array/isArray ...) should be (js/Array.isArray ...) instead. Is this correct? ClojureScript: Up and running states that / can be used for JS module objects, which I take to mean root-level objects - their example is (Raphael/color....) from the Raphael JS library. Their discussion of the differences in this-binding is confusing since it seems that / *should* be used for JS but only in the case of top-level objects. 2. confirm-ns in analyzer.clj contains a list of namespaces which should not warn, i.e. which are implicitly required, as I understand it (cljs.core, goog, Math, goog.string). CLJS itself contains examples like (Math/floor...) - does this mean that JS module objects are considered namespaces? Is this true of provide'd Google Closure namespaces (e.g. goog.string, which is also used like this in the CLJS source)? 3. Using e.g. :include-macros, it's possible to have the same alias refer both to a CLJS and CLJ namespace simultaneously. I'm assuming that in this case, if a symbol name were to conflict, that the macro form would take precedence in the head of a list (since macroexpansion happens before evaluation) but the CLJS form would take precedence everywhere else. Is this correct? 4. I'm assuming that my-namespace.cljs does not implicitly refer macros from my-namespace.clj - is this correct? Thanks for any clarification! Cheers, Colin -- 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 clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.