Skip to content
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

rename Future::select to Future::race #425

Closed
yoshuawuyts opened this issue Oct 31, 2019 · 5 comments
Closed

rename Future::select to Future::race #425

yoshuawuyts opened this issue Oct 31, 2019 · 5 comments
Labels
api design Open design questions

Comments

@yoshuawuyts
Copy link
Contributor

yoshuawuyts commented Oct 31, 2019

Both JS and reactive streams use race for what we call select. So perhaps we should consider following suit.

This is after feedback from @withoutboats that the name may not be right.

@yoshuawuyts yoshuawuyts added the api design Open design questions label Oct 31, 2019
@k-nasa
Copy link
Member

k-nasa commented Oct 31, 2019

I like this name Future::race. It's familiar to me, than select.

@yoshuawuyts
Copy link
Contributor Author

I'll update #405 with this change.

@skade
Copy link
Collaborator

skade commented Nov 1, 2019

While I agree that race is a good name, I would not use familiarity and the JS API as a (final) argument. We should come up with something better.

The reasoning is mainly that this requires the user to have a specific context (either being from the JS world or knowing the specifics of select vs race). We should also somehow make sure that people searching select may also find race.

@ghost
Copy link

ghost commented Nov 1, 2019

Related (here I talked about select! but it also applies to select()): rust-lang/futures-rs#760 (comment)

Good counterpoint to mine: rust-lang/futures-rs#760 (comment)

We should also somehow make sure that people searching select may also find race.

I believe we could mention "select" in the docs of race() and then it would pop up when searching for "select" in rustdoc.

@yoshuawuyts
Copy link
Contributor Author

This was closed by #405.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api design Open design questions
Projects
None yet
Development

No branches or pull requests

3 participants