Well, the question is as simple as that. I’m almost done reading the metaprogramming section, on the manual. I’m completely new to the concept, and quite new to Julia too (although I’ve written some programs already and I’m used to python, whose syntax resembles Julia’s - albeit the programming style not quite so). As it seems to me, if I want my program to change pieces of code while running, I should define these pieces as expressions – for instance, defining a variable
x = :(for i in 1:10 println(i) end) – and use
eval() on them when needed, but I can’t do it the other way around, i.e., defining
x = for i in 1:10 println(i) end
and then using something over
x yielding the expression
:(for i in 1:10 println(i) end).
Is that correct?