I have started to use Metaprogramming now. While my code is running, I noticed that there are some things that I do not understand. My understanding is that at the simplest level macros return an expression which is then evaluated. So, I tried to define a variable b and set its value to one using a macro:
When I then run in REPL:
Then I get an error message:
ERROR: UndefVarError: b not defined
The macro seems to return 1.
On the other hand if I type,
Then b is defined in the REPL.
I would have expected the macro and the eval call to have the same effect. Apparently, there is something I am not understanding here…