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

[SR-125] Add rotate algorithm #42747

Open
gribozavr opened this issue Dec 7, 2015 · 12 comments
Open

[SR-125] Add rotate algorithm #42747

gribozavr opened this issue Dec 7, 2015 · 12 comments
Labels
feature A feature request or implementation good first issue Good for newcomers improvement standard library Area: Standard library umbrella swift evolution proposal needed Flag → feature: A feature that warrants a Swift evolution proposal

Comments

@gribozavr
Copy link
Collaborator

Previous ID SR-125
Radar rdar://problem/19055052
Original Reporter @gribozavr
Type Improvement
Status Reopened
Resolution
Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Improvement, NewAPIRequest, StarterBug
Assignee HarieshJay (JIRA)
Priority Medium

md5: ccc424105bba16b3f829a36e196fe08d

Issue Description:

Swift needs a rotate algorithm, equivalent to std::rotate() in C++.

@natecook1000
Copy link
Member

One of the implementations of rotate (for bidirectional collections) is implemented using a reverse in place algorithm—would that be a good one to add to the public API as well?

@gribozavr
Copy link
Collaborator Author

I don't see why not.

@swift-ci
Copy link
Collaborator

Comment by Félix Fischer (JIRA)

Hey Nate, are you still working on this?

I can take it for you ^^

@swift-ci
Copy link
Collaborator

Comment by Félix Fischer (JIRA)

I just realised that your comments were from 2016 XD

Then, I'll take it

@natecook1000
Copy link
Member

Hi Felix - thanks for looking at this! There's an implementation of rotate in test/Prototypes/Algorithms.swift.gyb. You can take a look at that - there are a couple different approaches.

In any case, to add this to the standard library would require a Swift Evolution proposal. If you're interested in submitting one of those, you'll want to take a look at the one that was rejected for Swift 3 and the rationale there.

@belkadan
Copy link
Contributor

Resetting assignee for all Starter Bugs not modified since 2018.

@swift-ci
Copy link
Collaborator

Comment by Hariesh Jayanthan (JIRA)

I believe rotate has been implemented in this file.

@belkadan
Copy link
Contributor

That's what it might look like, but that's not part of the standard library yet. (Notice it's under test/.)

@swift-ci
Copy link
Collaborator

Comment by Hariesh Jayanthan (JIRA)

Ahhh sorry about that. I don't know how I didn't notice.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@MartinSandeCosta
Copy link

@natecook1000 I have taken a look at your Swift Evolution proposal. This seems like a pretty interesting issue to start with! Would you be ok with me picking this up where you left it? I would love to apply another proposal taking into account all the feedback received in the review

@AnthonyLatsis AnthonyLatsis added feature A feature request or implementation and removed API request labels Jan 27, 2023
@Rajveer100
Copy link
Contributor

Rajveer100 commented Feb 16, 2023

Where would this algo go to, I mean in which file should this be implemented in?
@AnthonyLatsis

@AnthonyLatsis AnthonyLatsis added the swift evolution proposal needed Flag → feature: A feature that warrants a Swift evolution proposal label Feb 16, 2023
@AnthonyLatsis
Copy link
Collaborator

See earlier comments for tips. This needs an evolution proposal, by the way. If you are interested, I suggest reading though the previous proposal and its review stages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A feature request or implementation good first issue Good for newcomers improvement standard library Area: Standard library umbrella swift evolution proposal needed Flag → feature: A feature that warrants a Swift evolution proposal
Projects
None yet
Development

No branches or pull requests

7 participants