# New scope solution

**URL:** https://discourse.julialang.org/t/new-scope-solution/16707
**Category:** Internals & Design
**Tags:** proposal
**Created:** [October 23, 2018, 8:58pm UTC](https://discourse.julialang.org/t/new-scope-solution/16707 "2018-10-23T20:58:16Z")
**Posts on this page:** 1
**Showing post:** 87

<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: [October 28, 2018, 4:08am UTC](https://discourse.julialang.org/t/new-scope-solution/16707/87 "2018-10-28T04:08:02Z")

</div>

> [@StefanKarpinski](#):
>
> > - `for` , `while` , `try` - `catch` - `finally` , `let` , comprehensions, broadcast-fusing,
> 
> All scope-introducing constructs that occur outside of a function body.

Is it possible to exclude `let`? It will be very useful for requesting a clean namespace and “plain” scoping rule. I know I can write

```julia
(function()
    x = 0
    for i in 1:10
        x += i
    end
    x
end)()

```

but it feels like I’m writing javascript.

---

_[View the full topic](https://discourse.julialang.org/t/new-scope-solution/16707)._
