Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion standard/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@

### 8.4.3 Open and closed types

Any type can be classified as either an ***open type*** or a ***closed type***. An open type is a type that involves type parameters. More specifically:
All types can be classified as either ***open types*** or ***closed types***. An open type is a type that involves type parameters. More specifically:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The “can be” here should be something like “are” – we are defining things here. #1441 changes this line to:

Suggested change
All types can be classified as either ***open types*** or ***closed types***. An open type is a type that involves type parameters. More specifically:
Any type can be classified as either an ***open type*** or a ***closed type***. An open type is a type that involves type parameters. More specifically:

This still says “can be” so I think it is wrong. It also reads wrong to me, but that is subjective. I’m going to make some alternative suggestions, each in a seperate comment. Please 👍/👎🏻 as you see fit, including this one, and whomever merges can OK the preferred choice, or we don't merge and the #1441 version and “can be” stays.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
All types can be classified as either ***open types*** or ***closed types***. An open type is a type that involves type parameters. More specifically:
A type is classified as an ***open type*** or a ***closed type***. An open type is a type that involves type parameters. More specifically:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is “Every” better than “A”?

Suggested change
All types can be classified as either ***open types*** or ***closed types***. An open type is a type that involves type parameters. More specifically:
Every type is classified as an ***open type*** or a ***closed type***. An open type is a type that involves type parameters. More specifically:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is “classified” really required?

Suggested change
All types can be classified as either ***open types*** or ***closed types***. An open type is a type that involves type parameters. More specifically:
A type is either an ***open type*** or a ***closed type***. An open type is a type that involves type parameters. More specifically:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The last one feels awkward, this seems better but loses defined terms, @RexJaeschke feel free to correct my use of italics in lieu!

Suggested change
All types can be classified as either ***open types*** or ***closed types***. An open type is a type that involves type parameters. More specifically:
Every type is either **open** or **closed**. An open type is a type that involves type parameters. More specifically:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well those are my suggestions, all to remove “can be” – types are open/closed. Feel free to add your own of course :-)

Copy link
Member

Choose a reason for hiding this comment

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

I'm OK with most of the alternatives.

Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer "A type is either an open type or a closed type. " for 2 reasons:

  1. When defining a term it's best to use the singular.
  2. I prefer "type" as part of the term being defined, as without it the terms open and closed are just adjectives with no context.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With @RexJaeschke’s 👍 I think we have a winner (3 votes counting Rex), unless there are some late votes…


- A type parameter defines an open type.
- An array type is an open type if and only if its element type is an open type.
Expand Down Expand Up @@ -1016,8 +1016,8 @@
> {
> var t = new Test();
> if (t.DisappearingProperty != null)
> {

Check warning on line 1019 in standard/types.md

View workflow job for this annotation

GitHub Actions / Markdown to Word Converter

standard/types.md#L1019

MDC032::Line length 82 > maximum 81
> int len = t.DisappearingProperty.Length; // No warning. A compiler can

Check warning on line 1020 in standard/types.md

View workflow job for this annotation

GitHub Actions / Markdown to Word Converter

standard/types.md#L1020

MDC032::Line length 83 > maximum 81
> // assume property is stateful
> }
> }
Expand Down
Loading