dotnet / dotnet/csharpstandard

15.7.2.1 Four kinds of parameters?

Open
#127 6 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

From the end of the section:

> There are four kinds of formal parameters:

It then describes value, out, ref and params parameters.

What about optional vs required? What about `this` parameters? Are those not "kinds"? It's not clear what the purpose of this list is for... it seems a little out of place. Is it meant to just introduce the fact that that's what the next four subsections are about?

It's not really clear why optional parameters get a lot of space in 16.7.2.1 rather than having their own subsection, either. Fundamentally, the organization here seems to be built on accumulation of features over time - it's "Take the obvious structure for C# 1.0 and add bits within existing sections after that." Possibly a little harsh, but...

Definitely up for discussion in terms of how we handle this - what the right organization should be, given a set of somewhat-but-not-entirely orthogonal aspects of parameters.

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.