Metaprogramming in Julia is not really any less imperative than the rest of the language — a macro in Julia is basically just an ordinary Julia function that happens to be called at an unusual time (at code-lowering time, right after parsing but before compilation); you can implement it in an imperative style if you want.
Rather, I think this is the usual confusion between assignment and mutation that arises in all imperative languages that use the same =
symbol for both.