-
Notifications
You must be signed in to change notification settings - Fork 946
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
Drop platform name from extension traits #907
Conversation
I believe the reason these extension traits have the platform name in their name is because they are not exclusive and more than one may be imported at the same time. For example someone may need to have both |
I believe it's possible to use syntax such as |
If you don't need to refer to the traits by name, you can just do a glob import (playground). mod a {
pub trait Trait {}
}
mod b {
pub trait Trait {}
}
use a::*;
use b::*; |
See also previous discussion on #459 on Aug 15, 2018: #459 (comment) and #459 (comment) (at the end). |
My suggestion: Use plain It might also make sense to move the |
One more unsolicited idea concerning a possible module structure here:
(Disclosure: At this moment, I haven't looked at or used EL2 code yet, just reacting to issue and PR discussion.) |
Another approach (which isn't pretty but just putting it out there) is to have |
This is a pretty bikesheddy change. As such I don't feel all that strongly about it and I'm fine with any solution that addresses the problem @vberger mentioned, but since it's so low-impact I don't see a compelling reason to change it. |
Hey, I'd like to apologize for being so dismissive of this change in my comment yesterday. Not much discussion was had over the exact naming conventions for this in the original #459 thread, and we mostly settled on this because nobody proposed anything else. I'm open to changes here, but I'll still warn against getting too heated or spending too much time in this discussion - like many design choices, there isn't really a "right" answer here for the naming convention and it's a relatively minor part of the API to boot. Regardless, here's my two cents on why I'm fine with the current situation: I like internal consistency in designs. It doesn't make a whole lot of sense to me to have a To that end, I'd be okay with either:
Both have benefits. Both are slightly clunky. I don't feel that strongly about it, and am willing to go with whatever develops a consensus, but if no consensus develops we're just going to default to the current solution. |
Closing for inactivity. |
As mentioned in #459 (comment), I feel as though adding the name of the platform to the
Ext
traits feels awkward and inconsistent with the Rust ecosystem. Also, these traits are already within their own modules specific to each platform.CHANGELOG.md
if knowledge of this change could be valuable to users