# Local scope rules are confusing in inner scopes (Julia 1.6)

**URL:** https://discourse.julialang.org/t/local-scope-rules-are-confusing-in-inner-scopes-julia-1-6/64936
**Category:** General Usage
**Created:** [July 19, 2021, 5:08pm UTC](https://discourse.julialang.org/t/local-scope-rules-are-confusing-in-inner-scopes-julia-1-6/64936 "2021-07-19T17:08:06Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![jeff.bezanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeff.bezanson/32/48_2.png) [@jeff.bezanson](https://discourse.julialang.org/u/jeff.bezanson)
#### Post date: [July 20, 2021, 2:03am UTC](https://discourse.julialang.org/t/local-scope-rules-are-confusing-in-inner-scopes-julia-1-6/64936/2 "2021-07-20T02:03:52Z")

</div>

Yes, I think the explanation in the manual — despite quite a bit of revising over the years — is still not ideal. Overall, I think too much has been made of the hard- vs. soft-scope distinction. The way I think about it is that once you are inside a scope that can have local variables (e.g. `let`, `for`, or a function), everything follows very simple lexical scope rules: all variables and declarations are inherited by inner scopes. Things are only weird in the very first transition from global to local scope. That’s the only place “hardness” matters: for some forms (e.g. functions), we’ll always introduce new locals by default, and for others “it depends”. But once inside the comfort of a local scope, you don’t need to know which scopes are “hard”; they all behave the same — or at least they should!! Any exceptions will be entertained as bug reports.

---

_[View the full topic](https://discourse.julialang.org/t/local-scope-rules-are-confusing-in-inner-scopes-julia-1-6/64936)._
