You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A pretty big annoyance I have with infiltrator is it's use of global scope rules inside the REPL.
julia> using Infiltrator
julia> function foo()
@infiltrate
x = 1
for i in 1:5
x += 1
end
x
end;
julia> foo()
Infiltrating foo()
at REPL[9]:2
infil> x = 1
for i in 1:5
x += 1
end
┌ Warning: Assignment to `x` in soft scope is ambiguous because a global variable by the same name exists: `x` will be treated as a new local. Disambiguate by using `local x` to suppress this warning or `global x` to assign to the existing global variable.
└ @ none:3
ERROR: UndefVarError: `x` not defined
Stacktrace:
[1] top-level scope
@ ./none:3
Given that we are basically always running code meant to exist inside local scopes, it's a real friction for the code we run to have global scope rules. I have to wrap things in a let block and then I lose access to intermediate information.
I would really like to see the scope changed for the Infiltrator REPL.
The text was updated successfully, but these errors were encountered:
A pretty big annoyance I have with infiltrator is it's use of global scope rules inside the REPL.
Given that we are basically always running code meant to exist inside local scopes, it's a real friction for the code we run to have global scope rules. I have to wrap things in a
let
block and then I lose access to intermediate information.I would really like to see the scope changed for the Infiltrator REPL.
The text was updated successfully, but these errors were encountered: