One lesson from all those scope discussions is that scoping rules have complex interactions with each other and the rest of the language, so gotchas like this are common. Ideally new proposals should at least work through the 30–50 relevant examples that came up in those, and/or the cases in the tests.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Toward a real and final solution to Julia’s variable scope issue | 37 | 2539 | June 8, 2023 | |
| Global scope confusion again | 52 | 6913 | May 17, 2025 | |
| Explain scoping confusion to a programming beginner | 26 | 3353 | August 11, 2020 | |
| Remove the soft scope altogether and make it global | 49 | 4671 | May 17, 2025 | |
| Another possible solution to the global scope debacle | 231 | 19832 | November 6, 2018 |