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-7770] [String] Unify String.*View and Substring.*View #50309

Closed
milseman mannequin opened this issue May 24, 2018 · 3 comments
Closed

[SR-7770] [String] Unify String.*View and Substring.*View #50309

milseman mannequin opened this issue May 24, 2018 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. standard library Area: Standard library umbrella

Comments

@milseman
Copy link
Mannequin

milseman mannequin commented May 24, 2018

Previous ID SR-7770
Radar rdar://problem/40534188
Original Reporter @milseman
Type Bug
Status Closed
Resolution Won't Do
Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug
Assignee None
Priority Medium

md5: e192223e1caa04b90c8f63fdd005ea1b

Issue Description:

String's views already share storage with the original string from which they were derived. They're also already pretty massive (but this is getting reduced).

We should probably unify Substring.*View with String.*View which will both shrink the size of the stdlib, user code, and also allow Substring.*View to use the more efficient iterators rather than Slice's default IndexingIterator.

@milseman
Copy link
Mannequin Author

milseman mannequin commented May 24, 2018

@swift-ci create

@milseman
Copy link
Mannequin Author

milseman mannequin commented May 24, 2018

CC @moiseev

@milseman
Copy link
Mannequin Author

milseman mannequin commented Nov 8, 2018

We went with the plan of cleaning up the views to be exactly what Swift 5 needs, and having SubSequence just be a Slice of that view. This is a cleaner and more consistent model

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

0 participants