Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performed Copyediting for Minor Typos #1167

Open
wants to merge 9 commits into
base: draft-v8
Choose a base branch
from

Conversation

danielparvin
Copy link

Fixed various typos and minor formatting issues.

@danielparvin
Copy link
Author

danielparvin commented Sep 2, 2024 via email

Copy link
Contributor

@Nigel-Ecma Nigel-Ecma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well spotted, thanks!
Most of the English grammar ones look good however I will leave @RexJaeschke to check them. The typo fixes all look correct. The stylistic use of en/em-dash and escapes I'll defer to Rex again.
Unfortunately the C# grammar change is wrong and needs to be removed.

@@ -4460,7 +4460,7 @@ binary_operator_declarator

overloadable_binary_operator
: '+' | '-' | '*' | '/' | '%' | '&' | '|' | '^' | '<<'
| right_shift | '==' | '!=' | '>' | '<' | '>=' | '<='
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is wrong. The right_shift production exists to resolve a syntactic ambiguity in C#.

standard/classes.md Outdated Show resolved Hide resolved
Comment on lines -705 to -706
- If a standard implicit conversion ([§10.4.2](conversions.md#1042-standard-implicit-conversions)) exists from a type `A` to a type `B`, and if neither `A` nor `B` are *interface_type* `s`, then `A` is said to be ***encompassed by*** `B`, and `B` is said to ***encompass*** `A`.
- If a standard implicit conversion ([§10.4.2](conversions.md#1042-standard-implicit-conversions)) exists from an expression `E` to a type `B`, and if neither `B` nor the type of `E` (if it has one) are *interface_type* `s`, then `E` is said to be *encompassed by* `B`, and `B` is said to *encompass* `E`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The s here was intended to indicate a plural, I think; not a type whose name is s. That is, A is not an interface_type and B is also not an interface_type.

> | [§12.13](expressions.md#1213-logical-operators) | Logical OR | `\|` |
> | [§12.13](expressions.md#1213-logical-operators) | Logical OR | <code>&#124;</code> |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks OK for Markdown but will the automatic conversion to Word handle the syntax right?

Copy link
Contributor

@RexJaeschke RexJaeschke Sep 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will not! Leave this as it was.

standard/classes.md Show resolved Hide resolved
C# provides special syntax for invoking a delegate. When a non-`null` delegate instance whose invocation list contains one entry, is invoked, it invokes the one method with the same arguments it was given, and returns the same value as the referred to method. (See [§12.8.9.4](expressions.md#12894-delegate-invocations) for detailed information on delegate invocation.) If an exception occurs during the invocation of such a delegate, and that exception is not caught within the method that was invoked, the search for an exception catch clause continues in the method that called the delegate, as if that method had directly called the method to which that delegate referred.
C# provides special syntax for invoking a delegate. When a non-`null` delegate instance whose invocation list contains one entry is invoked, it invokes the one method with the same arguments it was given and returns the same value as the referred-to method. (See [§12.8.9.4](expressions.md#12894-delegate-invocations) for detailed information on delegate invocation.) If an exception occurs during the invocation of such a delegate, and that exception is not caught within the method that was invoked, the search for an exception catch clause continues in the method that called the delegate, as if that method had directly called the method to which that delegate referred.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here too, I'd prefer keeping the commas.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Please take a look at the newest commit and let me know what you think. I really dislike the first comma, but have added the second comma back in.

@@ -3780,7 +3780,7 @@ Once a particular non-ref-valued property or non-ref-valued indexer has been sel
>
> *end example*

Once a particular ref-valued property or ref-valued indexer has been selected; whether the usage is as a value, the target of a simple assignment, or the target of a compound assignment; the accessibility domain of the get accessor involved is used to determine if that usage is valid.
Once a particular ref-valued property or ref-valued indexer has been selected--whether the usage is as a value, the target of a simple assignment, or the target of a compound assignment--the accessibility domain of the get accessor involved is used to determine if that usage is valid.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make these em-dashes (---).

> | [§12.14](expressions.md#1214-conditional-logical-operators) | Conditional AND | `&&` |
> | [§12.14](expressions.md#1214-conditional-logical-operators) | Conditional OR | `\|\|` |
> | [§12.14](expressions.md#1214-conditional-logical-operators) | Conditional OR | <code>&#124;&#124;</code> |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comment above.

Comment on lines 2525 to 2526
> *Example*:
> The following shows a class that represents a contact with a name and a list of phone numbers, and the creation and initialization of a `List<Contact>`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert to original and put a space after the first colon. We want this to be a single quotation, not two!

@RexJaeschke
Copy link
Contributor

@danielparvin I just added my feedback as comments. I am quite new to the PR-reviewing process, and now that I'm done I just learned I could have turned my prose into specific code edits. C'est la vie!

@RexJaeschke
Copy link
Contributor

I just resolved the one conflict, which was introduced because of the very recent merging of PR #1172 and/or PR #1174.

Copy link
Contributor

@Nigel-Ecma Nigel-Ecma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment, will defer to @RexJaeschke on that, otherwise LGTM

- for an `in`, `out`, or `ref` parameter, the type of the argument expression is identical to the type of the corresponding parameter.
- the parameter-passing mode of the argument is value, and the parameter-passing mode of the corresponding parameter is input, and an implicit conversion ([§10.2](conversions.md#102-implicit-conversions)) exists from the argument expression to the type of the corresponding parameter.
- for a by-reference parameter, the type of the argument expression is identical to the type of the corresponding parameter.
- the parameter-passing mode of the argument is value, and the parameter-passing mode of the corresponding parameter is input, and an implicit conversion ([§10.2](conversions.md#102-implicit-conversions)) exists from the argument expression to the type of the corresponding parameter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the last bullet should retain its full-stop. For the innermost list on 1020-22 I’d also introduce with a colon (“and:” on 1020) and seperate with a semi-colon (“parameter; or” on 1021). But will defer to @RexJaeschke on these.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Nigel-Ecma , those changes make sense to me; thank you!

Copy link
Contributor

@Nigel-Ecma Nigel-Ecma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spotted one new change which needs to be reverted.

Otherwise looks OK to me.


When the implicit conversion from the argument type to the parameter type of an input parameter is a dynamic implicit conversion ([§10.2.10](conversions.md#10210-implicit-dynamic-conversions)), the results are undefined.
When the implicit conversion from the argument type to the parameter type of an `in` parameter is a dynamic implicit conversion ([§10.2.10](conversions.md#10210-implicit-dynamic-conversions)), the results are undefined.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change “input” -> “in” is incorrect (similar issues have been fixed recently in #1172)

Suggested change
When the implicit conversion from the argument type to the parameter type of an `in` parameter is a dynamic implicit conversion ([§10.2.10](conversions.md#10210-implicit-dynamic-conversions)), the results are undefined.
When the implicit conversion from the argument type to the parameter type of an input parameter is a dynamic implicit conversion ([§10.2.10](conversions.md#10210-implicit-dynamic-conversions)), the results are undefined.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I wondered about that. Thanks for catching that.

Copy link
Contributor

@Nigel-Ecma Nigel-Ecma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants