# Tips to cope with scoping rules of top level \`for\` loops etc

**URL:** <https://discourse.julialang.org/t/tips-to-cope-with-scoping-rules-of-top-level-for-loops-etc/24902>\
**Category:** General Usage\
**Tags:** scope\
**Created:** [June 4, 2019, 12:17am UTC](https://discourse.julialang.org/t/tips-to-cope-with-scoping-rules-of-top-level-for-loops-etc/24902 "2019-06-04T00:17:55Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)\
**Post date:** [June 6, 2019, 3:53am UTC](https://discourse.julialang.org/t/tips-to-cope-with-scoping-rules-of-top-level-for-loops-etc/24902/17 "2019-06-06T03:53:51Z")

</div>

> [@mbauman](#):
>
> [the Rebugger depends upon it](https://discourse.julialang.org/t/another-possible-solution-to-the-global-scope-debacle/15894/196)

It looks like there is a chance that `let`’s scoping rule will not be changed (hence not breaking Rebugger): [New scope solution - #223 by jeff.bezanson](https://discourse.julialang.org/t/new-scope-solution/16707/223)

Speaking of `let`, how about “wrap `for` in `let` together with initialization” as another tip?

---

_[View the full topic](https://discourse.julialang.org/t/tips-to-cope-with-scoping-rules-of-top-level-for-loops-etc/24902)._
