[Proposal] enhanced yield pattern #3685
Replies: 4 comments
-
is this not just a try catch finally? |
Beta Was this translation helpful? Give feedback.
-
The idea of a context before iteration was discussed before and the approach accepted by the LDM was the use of a local function to contain the actual iteration. |
Beta Was this translation helpful? Give feedback.
-
Can you share the discussion link? |
Beta Was this translation helpful? Give feedback.
-
I found dotnet/roslyn#2930 which isn't so much a discussion of lifecycles within an iterator but argument validation was listed as a specific motivation for local functions. The original proposal was added relatively early to Roslyn (dotnet/roslyn#259) so the original discussion might be buried in the CodePlex archives. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Beta Was this translation helpful? Give feedback.
All reactions