Hi, when I read the section of metaprogramming in Tom Kwong’s Book “Hands-on Design Patterns and Best Practices with Julia”, I came across such an example:
macro identity(ex) dump(ex) return ex end
And then when we define such a function in REPL as:
I am a little bit curious how Julia can execute the instruction dump(ex) when the macro is expanded, since we just define the function.
Or can anyone explain the mechanism, when julia internally parses the macro like this which does not include instruction in an expression?