Skip to content

Rename chained(with:) to chain(_:_:) #33

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

Merged
merged 2 commits into from
Oct 23, 2020
Merged

Conversation

natecook1000
Copy link
Member

Description

This follows a forum discussion about the chained(with:) name. The old names are preserved as deprecated symbols.

Detailed Design

The new version of chain looks like this:

func chain<S1, S2>(_ s1: S1, _ s2: S2) -> Chain2<S1, S2>

Documentation Plan

Updated the symbol documentation, guide, and README.

Test Plan

Updated existing tests to use the new name.

Source Impact

This deprecates the chained(with:) method and the Chain2 type.

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

This follows a forum discussion about the `chained(with:)` name.
The old names are preserved as deprecated symbols.
where Base1: RandomAccessCollection, Base2: RandomAccessCollection {}
extension Chain: LazySequenceProtocol where Base1: LazySequenceProtocol {}
extension Chain2: LazySequenceProtocol where Base1: LazySequenceProtocol {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this conformance should be removed altogether with chain being a free function.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! Another wrinkle in the various keep-it-lazy shenanigans.

@natecook1000 natecook1000 merged commit c582aa9 into main Oct 23, 2020
@natecook1000 natecook1000 deleted the nate/chained_to_chain branch October 23, 2020 21:45
@tonyarnold
Copy link

This is a harmful change for how I was using the code, ie:

seq1
    .chained(with: seq2)
    .chained(with: seq3)
    .chained(with: seq4)

Is there a good reason to remove the older variation beyond contributor happiness?

@mdznr
Copy link
Contributor

mdznr commented Feb 16, 2023

Just so that it is easier to find the relevant forum thread for anyone reading this later, here it is: https://forums.swift.org/t/naming-of-chained-with/40999

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

Successfully merging this pull request may close these issues.

4 participants