> A macro cannot depend on runtime information. A macro is a function > that is called at compile time, its argument is an expression (as > written by the programmer, or as returned by another macro), and its > result is a modified expression. There is no way a macro could access > runtime information. It is a program that works on program code, not > on runtime data.
Then what do people mean when they say that lisp blurs the distinction between compile-time and run-time? I thought that "macros executing at runtime" was part of this. But if not, I don't know what they do mean. I thought macros could get executed at runtime as follows. Suppose I have a domain-specific-language implemented in a lisp, using macros. Suppose at runtime some of this domain-specific-code gets generated somehow (code is data at this point). An "eval" is executed on this domain-specific-code, which causes the macros (used to implement the domain-specific-language) to transform the input code at runtime. Is this wrong? I also thought that when a "clojure application" is bundled up as java bytecode, this "executable" actually includes the clojure compiler. Why would this be included if compilation (including macros) is never performed at runtime? Is there something fundamental I am not understanding? Thanks, Mark P. --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---