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 range-based BinaryInteger.random(...) functions trap infinite ranges. It would be better to return nil. The current functions should be rewritten as unchecked conveniences with appropriate generic constraints.
The text was updated successfully, but these errors were encountered:
Hm. I suppose there are arguments in favor of keeping the trapping behavior. In particular, picking a random value in an infinite range a lot like multiplying an arbitrary integer until you run out of memory. It isn't undefined. You just run out of memory, or at least that's what the trapping behavior emulates. It might be best to keep overallocation handling, or lack thereof, consistent across the board.
The range-based
BinaryInteger.random(...)
functions trap infinite ranges. It would be better to returnnil
. The current functions should be rewritten as unchecked conveniences with appropriate generic constraints.The text was updated successfully, but these errors were encountered: