dotnet / dotnet/csharpstandard

12.6.1 Introduce term "function"

Open
#95 3 comments 0 reactions 0 assignees View on GitHub
status: gnarly type: clarity
Dominant language
C#
Stars
815
Forks
99
Avg merge
1d 14h
Merged PRs (30d)
16

Description

There are various places where it would be useful to encapsulate "function member or anonymous function" into a single term, effectively (and informally!) meaning "a piece of executable code which might have parameters".

Issue 237 highlights one example where "function member" is used where the new term would be appropriate, and I've just spotted that 4.16 ("parameter" definition) should also refer to anonymous functions. (I'll file a new issue for this.)

Proposal 1: we introduce the term "function" to mean "function member or anonymous function"

Proposal 2: this is introduced in section 13.6.1 (where the term "function member" is introduced) just before the closing note, with wording of:

> A function is a function member or anonymous function (§13.16).

Proposal 3: Replace all other occurrences of "function member or anonymous function" with "function" (8 occurrences) and "a function member or an anonymous function" with "a function" (1 occurrence)

Ideally we'd then check all occurrences of "function member" to see whether it should actually be function - that's quite a lot of occurrences to check, though...

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.