You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> The implementation of shuffleInPlace() uses the Fisher-Yates algorithm to randomly permute the elements in a collection. Because the Swift Standard Library does not provide a random number generator, this method must call a function imported from a system module. For this function to be compatible with both macOS and Linux, the code uses build configuration statements.
We can probably leave the example package as-is, but it might be confusing for new users to read the above statement. They might think there is some good reason not to use the RNG and collection-shuffling which does now exist in the standard library.
Perhaps something like "pretend the standard library did not provide a random number generator"?
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: e6c125ab85d5febb5f9741449b6d35b1
Issue Description:
https://swift.org/package-manager/
Under "Using Build Configuration Statements"
> The implementation of
shuffleInPlace()
uses the Fisher-Yates algorithm to randomly permute the elements in a collection. Because the Swift Standard Library does not provide a random number generator, this method must call a function imported from a system module. For this function to be compatible with both macOS and Linux, the code uses build configuration statements.We can probably leave the example package as-is, but it might be confusing for new users to read the above statement. They might think there is some good reason not to use the RNG and collection-shuffling which does now exist in the standard library.
Perhaps something like "pretend the standard library did not provide a random number generator"?
The text was updated successfully, but these errors were encountered: