-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
ScopedValues: add ScopedThunk #59402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
bikeshed: |
|
We seem to be missing |
|
|
|
I should have mentioned, that this was already added to ScopedValues.jl and is being upstreamed after some iteration. This interface was defined after some debate with @vchuravy. I would have no objection to Re: @JeffBezanson's suggestion, using So, waiting on input from Valentin. |
What definition? |
8a443f9 to
588ef58
Compare
The C++ one.
|
|
Yikes. We do not use that terminology in Julia. (Please feel free to use this as a citation to remove the incorrect information from the julia section in the wikipedia page ;) ). |
|
Although apparently we do in the manual... Am I just living in the twilight zone? We should not be. |
|
I don't see a problem with using a reasonably well-defined term pragmatically, even if category theorists complain. |
|
It's just not what it does, in either definition - it's a type of closure that closes over the dynamic scope. |
Ok, fixed that ;). I think for this pr, either |
|
I think the test failure is unrelated? |
|
@KristofferC can we backport this to 1.12? |
This enables taking a "snapshot" of scoped values and using that snapshot later.