Scope behaviors in Atom (Juno)

Love it or hate it, one just has to accept it at this point — it can’t be changed in Julia 1.x for non-interactive code without breaking backwards compatibility, which we won’t do.

Background: when Julia 1.0 was released, many people started complaining about the new scoping rules and there was extensive discussion. See e.g.

However, putting aside any discussion of the merits of one rule or another, the scoping rules could not be changed in files/modules after Julia 1.0 was released because of the backward-compatibility guarantee (until Julia 2.0 in the distant future). See also PSA: Julia is not at that stage of development anymore. As a compromise solution, after much debate, the behavior was changed in the interactive REPL (following an earlier experiment in IJulia) — and other interactive environments (vsCode and hopefully soon Juno) are now following suit — with a warning for code in files (scripts and modules).

At this point, there is no point in arguing about it — there is no argument you could possibly make that has not already been made dozens of times.

9 Likes