csharpstandard icon indicating copy to clipboard operation
csharpstandard copied to clipboard

Incorrect wording on variance in 17.2.3.3

Open 333fred opened this issue 3 years ago • 3 comments

https://github.com/dotnet/csharpstandard/blob/cabbf59f114db57172fd87c9429cdcc313aa716e/standard/interfaces.md?plain=1#L127

By definition, an identity conversion must exist from Aᵢ to itself. This should be Aᵢ to Bᵢ.

333fred avatar Sep 01 '22 23:09 333fred

Oh, and just above it, T<Bᵢ, ..., Aᵥ> should be T<Bᵢ, ..., Bᵥ>

333fred avatar Sep 01 '22 23:09 333fred

Finally, the section is header is not particularly clearly worded. A type `T<Aᵢ, ..., Aᵥ>` is variance-convertible to a type `T<Bᵢ, ..., Aᵥ>` if `T` is either an interface or a delegate type... defines two different Ts and then talks about T without differentiating between them. It is technically correct (really the T's are the same, but with different type parameters) but could be worded more clearly to convey this.

333fred avatar Sep 01 '22 23:09 333fred

@333fred your first two comments are typos introduced during the conversion of the Standard text to Markdown, they are both correct in the previous version the Standard.

Well spotted, thank you. Would you like to make a PR to fix just those two referencing this issue? You can put me down as a reviewer if you wish.

You can make a PR for your third comment as well if you wish, but keep it separate from the first which just fixes typos. Others will then review your PR and proposed clearer wording. Don't feel you need to make such a PR, noting the text could be clearer is valuable in itself.

Nigel-Ecma avatar Sep 02 '22 09:09 Nigel-Ecma