Conversation
Start the process of publishing the early alpha drafts in favor of the current committee working draft.
New version means lots of new clauses.
f7f3dc9 to
28dff23
Compare
Add clause number to the TOC.
There was a problem hiding this comment.
Pull request overview
This PR switches the published C# specification content from the current draft branch to an early C# 9 alpha draft, and updates multiple docs to point at the new section anchors in the specification.
Changes:
- Update the C# specification TOC and overview to present the C# 9 early draft.
- Revise many C# reference articles to link to updated section anchors in the spec.
- Adjust build/publishing configuration to pull the spec from the
alpha-v9branch and stop publishing C# 9 proposal pages.
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/csharp/specification/toc.yml | Renames and restructures the specification TOC to target the C# 9 early draft and adds numbered chapter labels. |
| docs/csharp/specification/overview.md | Updates the overview text and date to describe the early C# 9 draft. |
| docs/csharp/linq/index.md | Updates the spec anchor for query expressions. |
| docs/csharp/language-reference/operators/type-testing-and-cast.md | Updates spec anchors for is and as. |
| docs/csharp/language-reference/operators/true-false-operators.md | Updates spec anchors for Boolean expressions and user-defined conditional logical operators. |
| docs/csharp/language-reference/operators/switch-expression.md | Updates the spec anchor for switch expressions. |
| docs/csharp/language-reference/operators/subtraction-operator.md | Updates spec anchors for delegate equality and subtraction operator sections. |
| docs/csharp/language-reference/operators/operator-overloading.md | Updates the spec anchor for user-defined conditional logical operators in the non-overloadable operator table. |
| docs/csharp/language-reference/operators/null-coalescing-operator.md | Updates spec anchors for null-coalescing and compound assignment sections. |
| docs/csharp/language-reference/operators/lambda-operator.md | Updates the spec anchor for anonymous function expressions. |
| docs/csharp/language-reference/operators/lambda-expressions.md | Updates the spec anchor for anonymous function expressions. |
| docs/csharp/language-reference/operators/is.md | Updates the spec anchor for the is operator section. |
| docs/csharp/language-reference/operators/equality-operators.md | Updates spec anchors for delegate equality and relational/type-testing operators. |
| docs/csharp/language-reference/operators/delegate-operator.md | Updates the spec anchor for anonymous function expressions. |
| docs/csharp/language-reference/operators/conditional-operator.md | Updates the spec anchor for the conditional operator section. |
| docs/csharp/language-reference/operators/comparison-operators.md | Updates spec anchor for relational and type-testing operators. |
| docs/csharp/language-reference/operators/boolean-logical-operators.md | Updates spec anchors for logical/conditional/compound assignment sections and user-defined conditional logical operators. |
| docs/csharp/language-reference/operators/bitwise-and-shift-operators.md | Updates spec anchors for shift/logical/compound assignment sections. |
| docs/csharp/language-reference/operators/assignment-operator.md | Updates spec anchor for assignment operators. |
| docs/csharp/language-reference/operators/arithmetic-operators.md | Updates spec anchors for remainder/multiplication/division/addition/subtraction/compound assignment sections. |
| docs/csharp/language-reference/operators/addition-operator.md | Updates spec anchor for addition operator section. |
| docs/csharp/language-reference/keywords/const.md | Updates spec anchor for constant expressions section. |
| docs/csharp/language-reference/compiler-messages/overloaded-operator-errors.md | Updates spec anchor for user-defined conditional logical operators. |
| docs/csharp/language-reference/compiler-messages/lambda-expression-errors.md | Updates spec anchors for anonymous function expressions references. |
| docs/csharp/language-reference/builtin-types/enum.md | Updates spec anchors for enum logical/comparison operators. |
| docfx.json | Updates doc build inputs/metadata, including removal of C# 9 proposal pages from the proposal doc set. |
| .openpublishing.publish.config.json | Switches the _csharpstandard source branch from draft-v8 to alpha-v9. |
Comments suppressed due to low confidence (2)
docs/csharp/language-reference/operators/conditional-operator.md:89
- This page links to a C# 9 proposal doc (
~/_csharplang/proposals/csharp-9.0/target-typed-conditional-expression.md). With this PR removing C# 9 proposal pages from the doc build, this link will likely break unless it’s updated to a different target (or the proposal pages stay published).
For more information, see the [Conditional operator](~/_csharpstandard/standard/expressions.md#1221-conditional-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md).
Specifications for newer features are:
- [Target-typed conditional expression](~/_csharplang/proposals/csharp-9.0/target-typed-conditional-expression.md)
docs/csharp/language-reference/operators/lambda-expressions.md:336
- These feature proposal links point at C# 9 proposal docs under
~/_csharplang/proposals/csharp-9.0/…. Because this PR removes C# 9 proposal pages from the doc build, these links will likely break unless you update them to published targets (or restore publishing for C# 9 proposals).
For more information, see the [Anonymous function expressions](~/_csharpstandard/standard/expressions.md#1222-anonymous-function-expressions) section of the [C# language specification](~/_csharpstandard/standard/README.md).
For more information about these features, see the following feature proposal notes:
- [Lambda discard parameters](~/_csharplang/proposals/csharp-9.0/lambda-discard-parameters.md)
- [Static anonymous functions](~/_csharplang/proposals/csharp-9.0/static-anonymous-functions.md)
- [Lambda improvements](~/_csharplang/proposals/csharp-10.0/lambda-improvements.md)
| ## User-defined conditional logical operators | ||
|
|
||
| If a type with the defined `true` and `false` operators [overloads](operator-overloading.md) the [logical OR operator](boolean-logical-operators.md#logical-or-operator-) `|` or the [logical AND operator](boolean-logical-operators.md#logical-and-operator-) `&` in a certain way, the [conditional logical OR operator](boolean-logical-operators.md#conditional-logical-or-operator-) `||` or [conditional logical AND operator](boolean-logical-operators.md#conditional-logical-and-operator-) `&&`, respectively, can be evaluated for the operands of that type. For more information, see the [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12163-user-defined-conditional-logical-operators ) section of the [C# language specification](~/_csharpstandard/standard/README.md). | ||
| If a type with the defined `true` and `false` operators [overloads](operator-overloading.md) the [logical OR operator](boolean-logical-operators.md#logical-or-operator-) `|` or the [logical AND operator](boolean-logical-operators.md#logical-and-operator-) `&` in a certain way, the [conditional logical OR operator](boolean-logical-operators.md#conditional-logical-or-operator-) `||` or [conditional logical AND operator](boolean-logical-operators.md#conditional-logical-and-operator-) `&&`, respectively, can be evaluated for the operands of that type. For more information, see the [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12173-user-defined-conditional-logical-operators ) section of the [C# language specification](~/_csharpstandard/standard/README.md). | ||
|
|
There was a problem hiding this comment.
The link URL has a trailing space before the closing ), which can produce a broken link in Markdown. Remove the trailing space from the User-defined conditional logical operators link destination.
|
|
||
| A user-defined type can't overload the conditional logical operators `&&` and `||`. However, if a user-defined type overloads the [true and false operators](true-false-operators.md) and the `&` or `|` operator in a certain way, the `&&` or `||` operation, respectively, can be evaluated for the operands of that type. For more information, see the [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12163-user-defined-conditional-logical-operators ) section of the [C# language specification](~/_csharpstandard/standard/README.md). | ||
| A user-defined type can't overload the conditional logical operators `&&` and `||`. However, if a user-defined type overloads the [true and false operators](true-false-operators.md) and the `&` or `|` operator in a certain way, the `&&` or `||` operation, respectively, can be evaluated for the operands of that type. For more information, see the [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12173-user-defined-conditional-logical-operators ) section of the [C# language specification](~/_csharpstandard/standard/README.md). | ||
|
|
There was a problem hiding this comment.
The User-defined conditional logical operators link URL contains a trailing space before the closing ), which can break the link. Remove the trailing space from the link destination.
| | :---------: | --------------- | | ||
| |[`x && y`](boolean-logical-operators.md#conditional-logical-and-operator-), [<code>x || y</code>](boolean-logical-operators.md#conditional-logical-or-operator-)| Overload both the [`true`](true-false-operators.md) and [`false`](true-false-operators.md) operators and the [`&`](boolean-logical-operators.md#logical-and-operator-) or [<code>|</code>](boolean-logical-operators.md#logical-or-operator-) operators. For more information, see [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12163-user-defined-conditional-logical-operators ).| | ||
| |[`x && y`](boolean-logical-operators.md#conditional-logical-and-operator-), [<code>x || y</code>](boolean-logical-operators.md#conditional-logical-or-operator-)| Overload both the [`true`](true-false-operators.md) and [`false`](true-false-operators.md) operators and the [`&`](boolean-logical-operators.md#logical-and-operator-) or [<code>|</code>](boolean-logical-operators.md#logical-or-operator-) operators. For more information, see [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12173-user-defined-conditional-logical-operators ).| | ||
| |[<code>a[i]</code>](member-access-operators.md#indexer-operator-), [`a?[i]`](member-access-operators.md#null-conditional-operators--and-)|Define an [indexer](../../programming-guide/indexers/index.md).| |
There was a problem hiding this comment.
The User-defined conditional logical operators link URL ends with a trailing space before ). Remove the trailing space to avoid a broken link.
| @@ -63,11 +62,7 @@ | |||
| "exclude": [ | |||
| "**/README.md", | |||
| "inactive/**", | |||
| "rejected/**", | |||
| "csharp-9.0/nullable-reference-types-specification.md", | |||
| "csharp-9.0/nullable-constructor-analysis.md", | |||
| "csharp-9.0/nullable-parameter-default-value-analysis.md", | |||
| "csharp-9.0/skip-localsinit.md" | |||
| "rejected/**" | |||
| ] | |||
There was a problem hiding this comment.
docfx.json no longer includes _csharplang/proposals/csharp-9.0/*.md in the published content, but multiple docs in the repo still link to those pages (for example, ~/_csharplang/proposals/csharp-9.0/records.md). Either keep publishing the C# 9 proposal pages, or update those references (and any redirects that target /dotnet/csharp/language-reference/proposals/csharp-9.0/...) so builds don’t ship broken links.
|
|
||
| For more information, see the [Relational and type-testing operators](~/_csharpstandard/standard/expressions.md#1214-relational-and-type-testing-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). | ||
| For more information, see the [Relational and type-testing operators](~/_csharpstandard/standard/expressions.md#1215-relational-and-type-testing-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md). | ||
|
|
||
| For more information about equality of record types, see the [Equality members](~/_csharplang/proposals/csharp-9.0/records.md#equality-members) section of the [records feature proposal note](~/_csharplang/proposals/csharp-9.0/records.md). | ||
|
|
There was a problem hiding this comment.
This section links to the C# 9 records proposal (~/_csharplang/proposals/csharp-9.0/records.md). Since this PR stops publishing C# 9 proposal pages in docfx.json, this reference will likely become a broken link unless it’s updated to a published target (or the proposal pages remain included).
Start the process of publishing the early alpha drafts in favor of the current committee working draft.
Fixes #52875
Internal previews
Toggle expand/collapse
+and+=isoperator - Match an expression against a type or constant pattern"??and??=operators - the null-coalescing operatorsis,as,typeof, and casts