-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Add prefix(value:)
#2941
Add prefix(value:)
#2941
Conversation
Two bits of feedback:
I agree that it can be useful and would be 👍 to adding it once those are addressed. |
@mdiep Thank you for feedback!
The name
There will be no |
I think that actually strengthens the case for naming it
Oh, right. 😆😅 |
Though there's a good naming reinforcement, I'm still a bit afraid to adopt this idea because there are already a lot of As seen in slack discussion, I will +1 to the name |
The compiler will say that for us because of |
I am going with beginsWith as well. startXXX() returns a disposable, where the potential startsWith wouldnt. |
@ReactiveCocoa/reactivecocoa This PR adds the equivalent of RAC2's @inamiy and @RuiAAPeres have argued that there's potential confusion between @mdiep has argued that there's a helpful parallel between |
My 2 cents: in my codebase I named this in an extension However, it might be good to consider how we're gonna name these methods with Swift 3 and the new API naming guidelines. Perhaps the one that returns a disposable could be Somewhat unrelated to this, I've also found a |
Maybe it would work to go a different route and name it something like |
Throwing out another option from left field -- |
Lol, @mdiep beat me by seconds. Good sign that we had the same suggestion independently. |
If it's no problem, I will rename this method and GH-issue title. |
Go for it, @inamiy! |
Done renaming in 608d501! |
Thanks @inamiy! This is great. ✨ And I'm glad we settled on |
@mdiep Thanks for merge & good naming! ✨ |
As discussed in Slack channel recently, there seem to have many reinvention of
beginWith
(old- (instancetype)startWith:(id)value
), so I think it's good time to add one for Swift code.Example of
beginWith
are:2016/05/31 Updated: Renamed
beginWith()
toprefix(value:)