Skip to content

[5.0] Revise documentation for Swift 5 stdlib additions #21644

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

Conversation

natecook1000
Copy link
Member

Cherry pick of #21333.

Explanation: Documentation revisions for Swift 5 addditions to the standard library.
Scope of Issue: No code changes, these are documentation comments only. There is a small amount of additional gyb code added to support documenting the vector types, but the only changes to the rendered Swift files are documentation changes.
Risk: Minimal.
Reviewer: Ben Cohen @airspeedswift, Steve Canon @stephentyrone, Michael Ilseman @milseman
Testing: The standard test and validation suites.
Radar: rdar://problem/47055142

)

* 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 natecook1000 requested a review from a team as a code owner January 4, 2019 20:59
@natecook1000
Copy link
Member Author

@swift-ci Please test

@natecook1000
Copy link
Member Author

@swift-ci Please nominate

@bob-wilson
Copy link
Contributor

This was merged to swift-5.0-branch-12-12-2018 so I'm going to go ahead and merge this one.

@bob-wilson bob-wilson merged commit 76c54f9 into swiftlang:swift-5.0-branch Jan 14, 2019
@natecook1000
Copy link
Member Author

Thanks, @bob-wilson!

@natecook1000 natecook1000 deleted the nc5_stdlib_docupdates branch January 14, 2019 18:59
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.

3 participants