Skip to content

[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

Merged
merged 19 commits into from
Jan 4, 2019

Conversation

natecook1000
Copy link
Member

@natecook1000 natecook1000 commented Dec 14, 2018

This is tracking WIP to revise the docs for the additions in SE-0221.

@natecook1000 natecook1000 changed the title [NO MERGE] Revise some Unicode scalar/Character properties [WIP] Revise documentation for Unicode scalar/Character properties Dec 14, 2018
@natecook1000 natecook1000 changed the title [WIP] Revise documentation for Unicode scalar/Character properties [WIP] Revise documentation for Swift 5 stdlib additions Jan 2, 2019
natecook1000 and others added 10 commits January 2, 2019 15:21
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.
natecook1000 and others added 4 commits January 3, 2019 01:51
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.
@natecook1000
Copy link
Member Author

These changes are ready for review:

@milseman for the Character/UnicodeScalar properties
@stephentyrone for the SIMD types/protocols
and also @airspeedswift

@natecook1000
Copy link
Member Author

@swift-ci Please smoke test

Copy link
Member

@milseman milseman left a 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

@natecook1000
Copy link
Member Author

@swift-ci Please smoke test and merge

@natecook1000
Copy link
Member Author

@swift-ci Please smoke test

@natecook1000 natecook1000 merged commit f19aca6 into swiftlang:master Jan 4, 2019
natecook1000 added a commit to natecook1000/swift that referenced this pull request Jan 4, 2019
)

* 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.
natecook1000 added a commit to natecook1000/swift that referenced this pull request Jan 4, 2019
)

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.
shahmishal added a commit that referenced this pull request Jan 4, 2019
[5.0 12/12] Revise documentation for Swift 5 stdlib additions (#21333)
@natecook1000 natecook1000 deleted the nc_unicode_props branch August 29, 2019 19:36
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.

7 participants