# Change \`ScopedValue\` default outside of \`with\`

**URL:** <https://discourse.julialang.org/t/change-scopedvalue-default-outside-of-with/130631>\
**Category:** General Usage\
**Created:** [July 11, 2025, 7:59am UTC](https://discourse.julialang.org/t/change-scopedvalue-default-outside-of-with/130631 "2025-07-11T07:59:39Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![benninkrs](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/benninkrs/32/3191_2.png) [@benninkrs](https://discourse.julialang.org/u/benninkrs)\
**Post date:** [October 19, 2025, 6:36pm UTC](https://discourse.julialang.org/t/change-scopedvalue-default-outside-of-with/130631/4 "2025-10-19T18:36:44Z")

</div>

I had a similar desire. The `@with` construct is fine for coding but not very convenient for interactive work. My thought was not to have a mutable value but rather to enter and leave scope with separate commands, something like

```julia-auto
julia> @newscope x => 2.5

julia> # some interactive coding

julia> @endscope

```

Based on the answers to my question [How do ScopedValues actually work?](https://discourse.julialang.org/t/how-do-scopedvalues-actually-work/133270) I gather that scope changes are implemented in core Julia and thus something like this cannot be implemented in a package. But perhaps it is doable in principle?

---

_[View the full topic](https://discourse.julialang.org/t/change-scopedvalue-default-outside-of-with/130631)._
