So I can see that issues of scoping are a HUGE subject of debate in different places, and I don’t mean to join the debates over what julia should do.
Rather, I was hoping someone could lay out what the current state is (or, if all these discussions have resolved things, planned changes). I’m really struggling to figure out what behavior to expect right now…
e.g. for loops seem to not have access to variables outside the for loop in the REPL:
julia> i = 0 0 julia> for j in 1:10 i += j end ERROR: UndefVarError: i not defined Stacktrace:  top-level scope at ./REPL:2 [inlined]  top-level scope at ./none:0
But they do inside a function?
julia> function test() i = 0 for j in 1:10 i += j end return i end test (generic function with 1 method) julia> test() 55
Is this JUST about what happens in the REPL / jupyter notebooks? Is this an example of a more general rule that also applies to scoping of functions, etc. in the REPL / jupyter notebooks?
Again, no desire to join battles over shoulds, just want to understand what behavior to expect now in 1.1.0.