# Julia's loop scope behavior differs from Fortran?

**URL:** <https://discourse.julialang.org/t/julias-loop-scope-behavior-differs-from-fortran/50275>\
**Category:** General Usage\
**Created:** [November 17, 2020, 6:55am UTC](https://discourse.julialang.org/t/julias-loop-scope-behavior-differs-from-fortran/50275 "2020-11-17T06:55:06Z")\
**Posts on this page:** 1\
**Showing post:** 27

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [November 17, 2020, 7:14pm UTC](https://discourse.julialang.org/t/julias-loop-scope-behavior-differs-from-fortran/50275/27 "2020-11-17T19:14:43Z")

</div>

> [@Why not an even-harder scope?](https://discourse.julialang.org/t/why-not-an-even-harder-scope/50087/14):
>
> Having a lot of time thinking about it, I really believe that our current design is very close to optimal given just these assumptions: Locals may be implicitly declared by assignment The rules for all local scopes are the same The language has closures. There are languages where all variables have to be explicitly declared, i.e. you have to write var x or local x to declare a new local. This, of course, makes all problems relating to what scope an assignment assigns to go away: it’s the inne…

---

_[View the full topic](https://discourse.julialang.org/t/julias-loop-scope-behavior-differs-from-fortran/50275)._
