>
> The current optimizations are really only guaranteed to work on core.cljs. 
> I encountered the dependency problem while working on the optimizations.
>

It occurs to me that these sorts of optimizations would need to tunable. 
Direct arity dispatch, for example, eliminates an indirection which allows 
client code to automatically point to the latest version of a function 
(consider replacing a fixed arity overload with a variable arity one).
 

> 1) Namespaces need to be mapped to ClojureScript files. This would require 
>> a io/resource to discover them, which I guess involves setting CLASS_PATH?
>>
>
> I'm not sure why we need this - the user sets the src path. We can use 
> this to resolve files.
>

I'm looking at the compile-root function. It calls compile-file on each 
file, but doesn't pass through any of the needed information to find other 
files or see which other files have been compiled. The 
cljs.compiler/namespaces atom is insufficient because of interactive 
evaluation. Which "src path" are you referring to?

Shell scripts have PATH, Java has CLASS_PATH, Python has PYTHONPATH, Ruby 
has RUBYLIB, Node.js has NODE_PATH... it's annoying that there are so many 
of them, but they exist for a reason: It's about as simple as it gets for 
getting a piece of code for a given file name.

Now that said, I don't think the CLJS compiler should check an environment 
variable. Instead, it should check a dynamic Var or maybe an atom. Tools 
built on the compiler can agree on a environment variable, if it's 
appropriate.
 

> Not really :) Currently dependency ordering happens *after* compilation 
> which is unfortunate. It would be preferable to do dependency ordering 
> *before* analysis.
>

Before? Or during, recursively? ie. should analysis of require forms 
trigger resolution and analysis. My intuition says it should.

-- 
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

Reply via email to