-
-
Notifications
You must be signed in to change notification settings - Fork 437
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
Consider providing Rng methods as inherent methods #862
Comments
Traits are a core part of the Rust language. Is adding stuff like this really in the best interests of users, or is it simply causing confusion (I don't need to import The other angle on this is that we have been asked quite a few times to minimise dependencies. |
Note that it will cause duplication of methods in documentation, and if we'll add |
Already addressed by |
Case point: I think a good design for maximizing usability is Python's
With uniform paths, I think re-exporting all the methods as is will be nice:
|
We could do that. We have been more leaning towards suggesting users cache the If we want to expand this to A drawback is the arbitrary choice of which functions to make available this way: Personally I don't think requiring a single import ( |
Proposed resolution: reject. This adds to API surface for only minor convenience, and the In pursuit of open design, I will leave this topic open for discussion for some more time. Evidence-based arguments are preferred, but this is mostly an opinion issue. |
Rng is almost always used, so maybe consider providing its methods to at least
thread_rng
.Maybe using https://github.com/dtolnay/inherent ,
The text was updated successfully, but these errors were encountered: