Skip to content
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

[SR-11050] Package Manager docs on swift.org make incorrect statement about Swift Standard Library. #4688

Open
dempseyatgithub opened this issue Jun 30, 2019 · 0 comments
Labels

Comments

@dempseyatgithub
Copy link

Previous ID SR-11050
Radar None
Original Reporter @dempseyatgithub
Type Bug
Environment

swift.org site June 30th, 2019

Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: bf6b68aa10ef925fe7ed79e422fd8f04

Issue Description:

On swift.org in the Package Manager, Example Usage section at URL:

https://swift.org/package-manager/#example-usage

In the second paragraph of subsection 'Using Build Configuration Statements' it says:

"Because the Swift Standard Library does not provide a random number generator, this method must call a function imported from a system module."

The Swift Standard Library has had random APIs since Swift 4.2.

The SPM documentation is now misleading and gives a new Swift user the incorrect impression that they need to manually import and configure lower-level system calls correctly on macOS and Linux to get basic random number functionality.

Suggest updating the documentation to something like.

'Although the Swift Standard Library provides API for random number generation, for demonstration purposes this method will call a function imported from a system module.'

Possibly also adding a note after this section that says:

'Although the shuffleInPlace() method is implemented here for demonstration purposes, the Swift Standard Library provides a shuffle() method to shuffle mutable collections such as Array in place.'

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants