Explicit lambda capture #7547
JonathanStarup
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Inspired by C++, an optional part of local defs or lambdas could be a list of captured variables (notation up for discussion), fx.
inner
enforces that onlycoolStructure
is used inside, and notable says thate
is not. This could avoid hard-to-debug errors, and it seems like a common pattern.e
should not be removed from scope since it would be bad to introduce anothere
variable, so it should just be checked that it is not captured.Beta Was this translation helpful? Give feedback.
All reactions