Andrew wrote:
> 1. Can I have compile time evaluation forms like in Lisp? For example,
> I want to obtain current namespace during macro expansion, or make
> Java imports in compile time. Is it possible?

Unless I'm misunderstanding what you want, sure.  Just access *ns* or 
(import 'whatever) in your macro.  Also anything that is at the 
top-level (not in a function) will be called at compile-time (eg put in 
println at the top-level and compile it and the compiler will print 
something out).

> 2. Can I precompile Clojure code (not generated classes) and load
> precompiled version instead of text script?

Sure.  If your source file is called foo.clj (and is the in the 
classpath) just do (compile 'foo) and Clojure will spit out a compiled 
version.  Put the compiled version in the classpath and then you can 
(use 'foo) just as if it were source code.


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