-
Notifications
You must be signed in to change notification settings - Fork 93
Update the introduction of open and closed types. #1447
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
base: draft-v8
Are you sure you want to change the base?
Conversation
Alternatives for the first line of §8.4.3, the starting point is the **temporary** reinstatement of the line as it was before #1441 was merged.
Nigel-Ecma
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think “can be” is wrong, but I’m flexible on the wording beyond that – I’ve made a few suggestions but feel free to propose something better.
| ### 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: |
There was a problem hiding this comment.
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:
| 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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: |
There was a problem hiding this comment.
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”?
| 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is “classified” really required?
| 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: |
There was a problem hiding this comment.
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!
| 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: |
There was a problem hiding this comment.
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 :-)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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:
- When defining a term it's best to use the singular.
- I prefer "type" as part of the term being defined, as without it the terms open and closed are just adjectives with no context.
There was a problem hiding this comment.
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…
BillWagner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM once others weigh in as well.
| ### 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: |
There was a problem hiding this comment.
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.
Alternatives for the first line of §8.4.3, the starting point is the temporary reinstatement of the line as it was before #1441 was merged. See comments on the line.