IssueRaiser

Champion "static local functions" (16.3, Core 3)

The proposal is to declare a local function as non-capturing. The keyword to indicate that would be `static`. Note: if we do this, then we should also consider allowing parameters and locals of the local function to shadow parameters and locals from the containing method. - [ ] Proposal added - [ ] Discussed in LDM - [ ] Decision in LDM - [ ] Finalized (done, rejected, inactive) - [ ] Spec'ed Related discussion thread, including a discussion of "capture lists" (a more elaborate feature): https://github.com/dotnet/csharplang/issues/1277 Note: EE scenarios are a concern. Do we want to allow some other modifiers (like `unsafe`)? LDM history: - https://github.com/dotnet/csharplang/blob/master/meetings/2018/LDM-2018-09-10.md - https://github.com/dotnet/csharplang/blob/master/meetings/2019/LDM-2019-01-16.md (shadowing in lambdas)

Posted by jcouv on May 24, 2018, 9:20 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.4,000 issues0 comments

github (Software)

Champion "static local functions" (16.3, Core 3)

jcouvMay 24, 2018, 9:20 PM

The proposal is to declare a local function as non-capturing. The keyword to indicate that would be `static`. Note: if we do this, then we should also consider allowing parameters and locals of the local function to shadow parameters and locals from the containing method. - [ ] Proposal added - [ ] Discussed in LDM - [ ] Decision in LDM - [ ] Finalized (done, rejected, inactive) - [ ] Spec'ed Related discussion thread, including a discussion of "capture lists" (a more elaborate feature): https://github.com/dotnet/csharplang/issues/1277 Note: EE scenarios are a concern. Do we want to allow some other modifiers (like `unsafe`)? LDM history: - https://github.com/dotnet/csharplang/blob/master/meetings/2018/LDM-2018-09-10.md - https://github.com/dotnet/csharplang/blob/master/meetings/2019/LDM-2019-01-16.md (shadowing in lambdas)

Comments (0)

No comments yet. Start the discussion.

Comment on this issue