Skip to content

Consider renaming .connect() to .join() #24645

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

Closed
barosl opened this issue Apr 20, 2015 · 7 comments
Closed

Consider renaming .connect() to .join() #24645

barosl opened this issue Apr 20, 2015 · 7 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@barosl
Copy link
Contributor

barosl commented Apr 20, 2015

SliceConcatExt has a method named .connect(), which is similar to .join() in other languages. I don't have any specific numbers, but "join" seems to be used more widely.

We could not use "join" because it was previously a keyword. Now it isn't, and SliceConcatExt is currently marked as unstable, so how about renaming the method to a more popular name?

One blocker is that SliceConcatExt is already exported to the prelude. So, although it is technically unstable, the change will still break the currently accepted beta-compatible code.

Will this require a RFC?

cc http://www.reddit.com/r/rust/comments/336rj3/whats_the_best_way_to_join_strings_with_a_space/

@steveklabnik
Copy link
Member

/cc @aturon

@steveklabnik steveklabnik added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Apr 20, 2015
@frewsxcv
Copy link
Member

What other languages use:

@petrochenkov
Copy link
Contributor

@bombless
Copy link
Contributor

+1, we should do it in 1.1-nighty

@aturon
Copy link
Member

aturon commented May 1, 2015

Interesting! I'd always found the connect name intuitive, but the precedent here seems quite strong.

It'd be good for this to go through an RFC. We can't do an outright renaming at this point, but we could deprecate the old name and introduce a new one if there's strong enough consensus. (The fact that the methods of this trait are already stable reflects a commitment to the existing names; the lack of stability of the trait is more about how we provide these impls in std.)

@frewsxcv
Copy link
Member

rust-lang/rfcs#1102 merged, this can probably be closed?

@alexcrichton
Copy link
Member

Indeed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

7 participants