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

SE-0246: Protocols and static functions #23824

Merged
merged 1 commit into from
Apr 17, 2019

Conversation

stephentyrone
Copy link
Contributor

This implements the protocols and static functions proposed in SE-0246, plus some initial test coverage. It also has some rough accompanying cleanup of tgmath. It does not include the globals (on scalars or SIMD types) nor does it deprecate much in tgmath.h.

rdar://problem/17625344

This implements the protocols and static functions proposed in SE-0246, plus some initial test coverage. It also has some rough accompanying cleanup of tgmath. It does not include the globals (on scalars or SIMD types) nor does it deprecate much in tgmath.h.
@stephentyrone
Copy link
Contributor Author

@swift-ci please test

@stephentyrone
Copy link
Contributor Author

@swift-ci please test source compatibility

@Coeur
Copy link
Contributor

Coeur commented Apr 16, 2019

As SE-0246 gives a standard name for those functions, please deprecate for Swift 5.1 formSquareRoot and eventually squareRoot. See the comment from Steve Canon:

Even the existing method x.formSquareRoot( ) was probably ill-considered because it doesn't offer any efficiency wins, but everyone was quite gung-ho about testing out the edges of the naming conventions at that point. It's a vestigial curiosity now that we might deprecate at some future point.

By deprecating for Swift 5.1 formSquareRoot/squareRoot in favor or sqrt, we would be consistent with the availability messages for M_SQRT2/M_SQRT1_2 coming from https://github.com/apple/swift/pull/23956/files.

@xwu
Copy link
Collaborator

xwu commented Apr 16, 2019

I’m sure Steve is well aware of his own comment :)

Deprecation would require discussion on Swift Evolution and is not a part of SE-0246.

@Coeur
Copy link
Contributor

Coeur commented Apr 17, 2019

@xwu Oh, I didn't realize it was the same person.

@stephentyrone stephentyrone merged commit 57a4553 into swiftlang:master Apr 17, 2019
@stephentyrone stephentyrone deleted the just-the-statics-maam branch April 17, 2019 21:57
stephentyrone added a commit to stephentyrone/swift that referenced this pull request Jun 12, 2019
This implements the protocols and static functions proposed in SE-0246, plus some initial test coverage. It also has some rough accompanying cleanup of tgmath. It does not include the globals (on scalars or SIMD types) nor does it deprecate much in tgmath.h.
stephentyrone added a commit to stephentyrone/swift that referenced this pull request Aug 23, 2019
stephentyrone added a commit that referenced this pull request Aug 23, 2019
* Revert "Add availability information to the new Math function protocols (#24187)"

This reverts commit d2f6959.

* Revert "SE-0246: Protocols and static functions (#23824)"

This reverts commit 57a4553.

* Expected abi changes.
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.

3 participants