Skip to content

[SDK] Replace NSRange.toRange() with failable initialiser on Range<Int> #7446

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

Closed
wants to merge 1 commit into from

Conversation

karwa
Copy link
Contributor

@karwa karwa commented Feb 14, 2017

Fixes ABI FIXME #75

// FIXME(ABI)#75 (Conditional Conformance): this API should be an extension on Range.
// Can't express it now because the compiler does not support conditional
// extensions with type equality constraints.
@available(*, deprecated, message: "Use Range(_: NSRange) initialiser instead")
Copy link
Contributor

Choose a reason for hiding this comment

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

"initializer"

@karwa karwa force-pushed the rangemaker branch 2 times, most recently from 0f37636 to 0845687 Compare February 14, 2017 01:40
@parkera
Copy link
Contributor

parkera commented Feb 14, 2017

cc @phausler

@parkera
Copy link
Contributor

parkera commented Feb 14, 2017

Please make sure to get review from someone from Foundation for changes in the overlay.

@karwa
Copy link
Contributor Author

karwa commented Feb 14, 2017

Updated a comment on String.UTF16View

Sure, I'll make sure to request a review from one of you next time :). I just happened to notice that this ABI FIXME was implementable now.

@karwa
Copy link
Contributor Author

karwa commented Apr 12, 2017

pinging @phausler

@phausler
Copy link
Contributor

This is an API change and would make swift-corelibs deviate from the Darwin versions

@parkera
Copy link
Contributor

parkera commented Apr 12, 2017

This is in the overlay, actually. I think we should consider it for post-Swift 4.

@karwa
Copy link
Contributor Author

karwa commented Apr 12, 2017

The ABI FIXME led me to believe this source-breaking change was always planned when the requisite compiler features were available. It's just about when we force users to change their code. If the design is settled, I'd advocate for getting the "definitive" API out there as soon as possible.

@tkremenek
Copy link
Member

This pull request was opened 22 months ago. Is this still worth keeping open? There has been no movement here, and this PR cannot be merged as is into master.

@CodaFi
Copy link
Contributor

CodaFi commented Oct 21, 2019

The bulk of this has been subsumed by the new Range(_:in:) constructor. I'm going to close this. If there is any more movement or you would like to revisit this, please reopen this pull request and rebase it onto master @karwa.

@CodaFi CodaFi closed this Oct 21, 2019
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.

7 participants