# Not able to capture variable (via symbol) from outer scope?

**URL:** <https://discourse.julialang.org/t/not-able-to-capture-variable-via-symbol-from-outer-scope/46797>\
**Category:** New to Julia\
**Created:** [September 17, 2020, 6:45pm UTC](https://discourse.julialang.org/t/not-able-to-capture-variable-via-symbol-from-outer-scope/46797 "2020-09-17T18:45:57Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [September 17, 2020, 7:58pm UTC](https://discourse.julialang.org/t/not-able-to-capture-variable-via-symbol-from-outer-scope/46797/10 "2020-09-17T19:58:27Z")

</div>

> [@pdeffebach](#):
>
> OP consider using a dictionary to store values

Yes, this seems to fall into category 3 of [my list of common mis-applications of metaprogramming](https://discourse.julialang.org/t/how-to-warn-new-users-away-from-metaprogramming/35022/22). See also my [2019 JuliaCon talk on why you mostly shouldn’t use metaprogramming](https://youtu.be/mSgXWpvQEHE).

---

_[View the full topic](https://discourse.julialang.org/t/not-able-to-capture-variable-via-symbol-from-outer-scope/46797)._
