Hi, can someone explain what macro definition environment and macro call environment?
- I was reading the following page: http://docs.julialang.org/en/release-0.4/manual/metaprogramming/#man-metaprogramming - it says in the Hygiene section : "Local variables are then renamed to be unique (using the gensym() <http://docs.julialang.org/en/release-0.4/stdlib/base/#Base.gensym> function, which generates new symbols), and *global variables are resolved within the macro definition environment. "* * - Do these global variables also refer to function calls like time(), println() within a macro??* In a later passage: - Here the user expression ex is a call to time, but not the same time function that the macro uses. It clearly refers to MyModule.time. *Therefore we must arrange for the code in **ex to be resolved in the macro call environment.* *I am kind of confused how to think of the hygiene of a macro:* * - Should i be thinking in terms of what is returned as an expr from the macro should not conflict with the code context where it is returned?* * - Or should i be thinking in terms of what is being supplied to macro should not conflict with what is inside the macro?* *Thanks*