@eval vs defining on module

julia> StackFrame
ERROR: UndefVarError: StackFrame not defined

julia> @eval Base begin
           StackFrame
       end
Base.StackTraces.StackFrame

So if you don’t eval the code into Base you need to import all the functions/types etc from Base that you want to use.

I would call it “method overwriting”.

1 Like