# Best solution to Julia's soft scope problem?

**URL:** <https://discourse.julialang.org/t/best-solution-to-julias-soft-scope-problem/70199>\
**Category:** General Usage\
**Tags:** question\
**Created:** [October 22, 2021, 8:37am UTC](https://discourse.julialang.org/t/best-solution-to-julias-soft-scope-problem/70199 "2021-10-22T08:37:15Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [October 22, 2021, 9:27am UTC](https://discourse.julialang.org/t/best-solution-to-julias-soft-scope-problem/70199/5 "2021-10-22T09:27:30Z")

</div>

All the more reason to use functions: loops at global scope have terrible performance, but loops in a function have amazing performance. The more data you’re working with, the more this will matter.

But it’s also worth asking if those dozen arguments might lead a more productive life with a certain amount of organization into `struct`s, `Dict`s, etc.

This past Wednesday I taught a lecture that describes how thinking about testability can help clarify better ways of approaching code design: [https://github.com/timholy/AdvancedScientificComputing/blob/main/schedule/schedule\_2021.md](https://github.com/timholy/AdvancedScientificComputing/blob/main/schedule/schedule_2021.md) (see the Oct. 20 session).

---

_[View the full topic](https://discourse.julialang.org/t/best-solution-to-julias-soft-scope-problem/70199)._
