# Make names available within block

**URL:** <https://discourse.julialang.org/t/make-names-available-within-block/59633>\
**Category:** New to Julia\
**Created:** [April 20, 2021, 3:07am UTC](https://discourse.julialang.org/t/make-names-available-within-block/59633 "2021-04-20T03:07:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)\
**Post date:** [April 20, 2021, 3:07am UTC](https://discourse.julialang.org/t/make-names-available-within-block/59633/1 "2021-04-20T03:07:38Z")

</div>

Is it possible to make names accessible within a block, like this?

```julia
obj = (;x=1, y=2)
with obj do
x + y
end
# x and y are not accessible here

```

---

<div class="post-metadata">

**Author:** ![mcabbott](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcabbott/32/6603_2.png) [@mcabbott](https://discourse.julialang.org/u/mcabbott)\
**Post date:** [April 20, 2021, 3:43am UTC](https://discourse.julialang.org/t/make-names-available-within-block/59633/2 "2021-04-20T03:43:34Z")

</div>

With a macro:

```julia
julia> using StaticModules

julia> obj = (;x=1, y=2);

julia> @with obj begin
         @show x + y
       end;
x + y = 3

```
