-
Notifications
You must be signed in to change notification settings - Fork 739
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
Renaming Token #905
Comments
I agree with the stuttering, something that is anti-pattern in Go as well, but I'm not sure about Rust. In Go you can only import the package/namespace, i.e. I think is even clearer when importing/use more then one type, e.g. |
Related: rust-lang/api-guidelines#66 I'm fine w/ whatever. |
Specifically: rust-lang/api-guidelines#66 (comment) |
I agree with this comment, and I think Maybe we should have a "Looking for feedback" label so other we can get some more feedback from users? |
I created an RFC label. |
What's the motivation for changing it? |
@uazu The first line of documentation of With this change you can use |
The whole thing is a muddle of different terms right now, but fortunately it is a very small API so it's workable. However I find Token easy to understand, and Evented not easy to understand. I guess that Token lead to the name I was just looking at what these things are called in the underlying sys calls. Token is just called "data" in epoll and kqueue, which is less distinct than either ID or Token. Evented is just a "file descriptor". It appears that "handle" is not used now in the man pages, but is still commonly understood, and Windows uses that. UNIX has a lot of IDs that aren't called IDs -- so I think there is precedent for using other terms than ID (like "number" or "descriptor" or "key" or "handle"). Personally, I feel that having distinct terms within a local region of code helps understanding and discussion. But really this is very localized. It doesn't affect a lot of code, because the Tokens get wrapped in higher-level abstractions. Still, the first thing I learned about mio was that is was token-based. It seems strange to drop one of the clearer and more distinct names for something more generic. |
@uazu What you are saying does resonate with me. Do you have thoughts about what would be a better name than |
@carllerche I hope I wasn't being too critical. For
Those are the best ideas I've found. |
I was also confused by My personal favorite is thus |
I also agree with |
I think I like |
I think for now it's best to leave the |
Sounds good to me 👍 I will close this. |
Branching of #901. Renaming
Token
toEventedId
event::Id
(in a newevent
module`).The text was updated successfully, but these errors were encountered: