Referencing local variable before assignment results in unexpected behavior

I suggested something along the lines of C++ capture list a long time ago Explicit capture of variables in a closure. · Issue #14959 · JuliaLang/julia · GitHub. Probably not a good idea though.

1 Like