-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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-3780] UnsafeXXXBufferPointer should be its own SubSequence type #46365
Comments
I thought we decided it can't do that because the indexes of the slice won't match the indexes of the base. |
...and someone really insists that we have zero-based integer indexing for these; bleah. Maybe it would be acceptable to change the indices to pointers; then you could always do |
That works as long as you don't expect people to use integer subscripts. |
I'm not convinced it's super important to support that directly. To be fair, though, part of the idea was that you could transform your |
I tend to agree with you. Just wanted to make sure it was addressed if anyone made the proposal. (We'd also still have to support some integer operations for backwards compatibility.) |
If we supported those integer operations with the same syntax we currently use, we would break the semantics of programs. |
Hm. :-/ Then someone's going to have to be very clever about Swift 3 compatibility. |
Ben's convinced me that being a drop-in replacement for |
Additional Detail from JIRA
md5: e4fcaeeef82714e215544c3d2b388c2a
Issue Description:
It's inconvenient to slice one of these things and get some anonymous slice wrapper type, and there's no reason that should happen. Instead, UnsafeXXXBufferPointer should be its own SubSequence type
The text was updated successfully, but these errors were encountered: