SE-0202: Random Unification

You could also implement Random.default as a computed property that always vends a fresh generator (since all such values are equivalent):

extension Random {
  var `default`: DefaultRandomNumberGenerator {
    get { return DefaultRandomNumberGenerator() }
    set { /*discard*/ } 
  }
}
2 Likes