Skip to content

Conversation

@Azoy
Copy link
Contributor

@Azoy Azoy commented Sep 26, 2018

This is currently pending core team approval/evolution review. Evolution Post and Evolution PR

The generic version of next<T>() -> T was causing an issue where implementers of RandomNumberGenerator were not required to write next() -> UInt64 requirement. This patch removes both the extension methods on RandomNumberGenerator from public interface (I actually removed next<T>() -> T because it was a one-liner for T._random(using:).) Users are encouraged to write somewhat more meaningful code like Int.random(in: 0 ..< 10, using: &generator).

Resolves: SR-8758

cc: @airspeedswift @stephentyrone

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.

1 participant