Providing we're happy with disallowing circular dependencies (which is
what javac and clojure.lang.Compiler do anyway), I wonder if it might
be possible to have a build tool invoke the appropriate compilers on a
file-by-file basis, so that if foo.java depends on a class generated
by bar.clj, which in turn depends on the class defined in quux.java,
the compilation order is quux.java => bar.clj (at this stage
target/classes/quux.class already exists) => foo.java (at this stage
all the .class files generated by the compilation of bar.clj are there
in target/classes)...?

Alternatively, I suppose a "two-pass" compilation of Clojure sources
might be possible: (1) compile all Clojure code in a way heavily
reliant on reflection for all method calls on classes outside the base
library, disregarding all type hints and such; (2) compile the Java
code; (3) compile the Clojure code again, hopefully producing more
performant, less reflection-heavy bytecode.

I'm sure I'm missing lots of things, but I'd love to know which, so --
please let me know. :-)

Sincerely,
Michał

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