Difference b/w include("foo.jl") and eval(parse(readstring(open( "foo.jl" ))))

Let’s say you first entirely parse a file stream into an array of expressions.

Then you eval the parsed expressions one at a time.

There are some cases where macro nodes get compiled with currently undefined structs, generated functions, inlined functions, etc.

If you tried to do an include_string on a string composed of the same data (as the expression), an error would be raised.

Therefore it is sometimes preferable to load the expression naively (expecting the worst) instead of an eval?


edit: this might deal with the state of a package’s compiler (and stale parsed expression trees)?

maybe it just goes back to: