-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[WIP] Revise documentation for Swift 5 stdlib additions #21333
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
Conversation
It'll render a bit better this way.
- Use the Swift book style for referring to operators by name. - Pick a more standard introducer for referring to a code example.
- Reword some instances of passive voice or unnecessary future tense - Clarify who's doing what when (you, the type, or the compiler?) - Standardize on "you" rather than "client" - Standardize the "for more info, see" blocks - Fix capitalization of headings - Prefer contractions - Remove code voice from a heading - Reword a mixed prose / code voice hyphenation - Fix 'pre-allocate' -> 'preallocate'
In particular, add emphasis to mathematical symbols and equations to match how we document such things elsewhere. I'm using asterisks for single symbols, and underscores for equations because it's easier to read in-source when you don't have to escape multiplication within emphasis.
Tables aren't supported by Swift markup, so this wouldn't render properly in Xcode or on the web. I also reflowed the paragraph below since I added a few words to avoid starting a sentence with code voice.
- Adds a dictionary of spelled out numbers. Only numbers < 10 should be spelled out according to editorial. - Adds abstracts to some of the basic members.
This includes parameter descriptions for the xyzw properties and inits, but not for the unlabeled initializers. Combined with the protocol extension method abstracts, this should complete coverage of the concrete types.
Co-Authored-By: natecook1000 <[email protected]>
This makes the description of what a user must implement in a custom string interpolation type to get the behavior they want.
These changes are ready for review: @milseman for the Character/UnicodeScalar properties |
@swift-ci Please smoke test |
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.
Character and Scalar properties LGTM
@swift-ci Please smoke test and merge |
@swift-ci Please smoke test |
) * Revise the Unicode scalar/Character properties * Minor revisions to `compactMapValues` docs. * Add documentation for AdditiveArithmetic, revise Numeric * Apply minor style updates to count(where:). * Revise string interpolation docs. - Convert table of interpolation examples to a list of examples. Tables aren't supported by Swift markup, so this wouldn't render properly in Xcode or on the web. - Add a description of what a user must implement in a custom string interpolation type to get the behavior they want. * Revise isMultiple(of:) docs. - In particular, add emphasis to mathematical symbols and equations to match how we document such things elsewhere. - I'm using asterisks for single symbols, and underscores for equations because it's easier to read in-source when you don't have to escape multiplication within emphasis. * Add some abstracts to the SIMD vector types. - Adds a dictionary of spelled out numbers. Only numbers < 10 should be spelled out according to editorial. - Adds abstracts to some of the basic members. - Includes parameter descriptions for the xyzw properties and inits, but not for the unlabeled initializers. Combined with the protocol extension method abstracts, this should complete coverage of the concrete types.
) Note: This cherry-pick drops the documentation revisions to the Result type, which isn't included on this branch. * Revise the Unicode scalar/Character properties * Minor revisions to `compactMapValues` docs. * Add documentation for AdditiveArithmetic, revise Numeric * Apply minor style updates to count(where:). * Revise string interpolation docs. - Convert table of interpolation examples to a list of examples. Tables aren't supported by Swift markup, so this wouldn't render properly in Xcode or on the web. - Add a description of what a user must implement in a custom string interpolation type to get the behavior they want. * Revise isMultiple(of:) docs. - In particular, add emphasis to mathematical symbols and equations to match how we document such things elsewhere. - I'm using asterisks for single symbols, and underscores for equations because it's easier to read in-source when you don't have to escape multiplication within emphasis. * Add some abstracts to the SIMD vector types. - Adds a dictionary of spelled out numbers. Only numbers < 10 should be spelled out according to editorial. - Adds abstracts to some of the basic members. - Includes parameter descriptions for the xyzw properties and inits, but not for the unlabeled initializers. Combined with the protocol extension method abstracts, this should complete coverage of the concrete types.
[5.0 12/12] Revise documentation for Swift 5 stdlib additions (#21333)
This is tracking WIP to revise the docs for the additions in SE-0221.