# REPL and for loops (scope behavior change)

**URL:** <https://discourse.julialang.org/t/repl-and-for-loops-scope-behavior-change/13514>\
**Category:** General Usage\
**Created:** [August 15, 2018, 5:26pm UTC](https://discourse.julialang.org/t/repl-and-for-loops-scope-behavior-change/13514 "2018-08-15T17:26:35Z")\
**Posts on this page:** 3\
**Page:** 3

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [September 16, 2020, 1:30pm UTC](https://discourse.julialang.org/t/repl-and-for-loops-scope-behavior-change/13514/41 "2020-09-16T13:30:28Z")

</div>

It may be helpful to post a new topic that describes exactly what you’re running into with a minimal example folks can use to understand what’s going on.

Edit: ah, I see you have here: [Tips to cope with scoping rules of top level `for` loops etc - #28](https://discourse.julialang.org/t/tips-to-cope-with-scoping-rules-of-top-level-for-loops-etc/24902/28)

---

<div class="post-metadata">

**Author:** ![goodluck](https://avatars.discourse-cdn.com/v4/letter/g/65b543/32.png) [@goodluck](https://discourse.julialang.org/u/goodluck)\
**Post date:** [September 16, 2020, 2:40pm UTC](https://discourse.julialang.org/t/repl-and-for-loops-scope-behavior-change/13514/42 "2020-09-16T14:40:28Z")

</div>

i perfectly understand that, and as you outline it it is perfectly true. but that entails a heavy abstraction (or rather, “de-abstracts”) upon what a named-assignable-to-entity is normally understood to be. introducing such mental overload in a _language_ which is a codification of _intent_ i think is problematic.

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [September 16, 2020, 2:57pm UTC](https://discourse.julialang.org/t/repl-and-for-loops-scope-behavior-change/13514/43 "2020-09-16T14:57:08Z")

</div>

This depends on the language. C++ assigned names, R places things in boxes. Whether it’s intuitive depends on where you are coming from. I would encourage you to take some more time learning julia and reading the manual, over time the behavior of variable assignment will become more intuitive.

[Previous page](https://discourse.julialang.org/t/repl-and-for-loops-scope-behavior-change/13514.md?page=2)
