Skip to content

[4.2] Obsolete unsafeArithmetic operations on Integers. #19425

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

Conversation

stephentyrone
Copy link
Contributor

@stephentyrone stephentyrone commented Sep 20, 2018

Mark these deprecated as of 4.2, per discussion with core team and https://forums.swift.org/t/removing-unsafe-arithmetic-methods/16169

They will be removed in 5.0 via a second PR.

Scope: Deprecate some operations that are unused and an attractive nuisance.
Radar: rdar://problem/43688685
Risk: Low – as far as we know, no one uses these.
Testing: Normal test suite.
Reviewers: @airspeedswift

@stephentyrone stephentyrone changed the title [4.2] Obsolete unsafeArithmetic oeprations on Integers. [4.2] Obsolete unsafeArithmetic operations on Integers. Sep 20, 2018
@stephentyrone
Copy link
Contributor Author

@swift-ci please smoke test.

@moiseev
Copy link
Contributor

moiseev commented Sep 20, 2018

Should we move them to the MigrationSupport.swift then?

@stephentyrone
Copy link
Contributor Author

4.2 doesn’t have MigrationSupport.swift?

@airspeedswift
Copy link
Member

Nope. Did that after.

@airspeedswift
Copy link
Member

Do we want a comment too? Not sure if why they're going away can be pithily expressed in a sentence (maybe using emoji)

@stephentyrone
Copy link
Contributor Author

@swift-ci please test.

@stephentyrone
Copy link
Contributor Author

@airspeedswift I wanted to write a comment, but really couldn't come up with one that wasn't a short essay, and also I remembered that no one actually uses these, so it would be write-once read-never.

@stephentyrone
Copy link
Contributor Author

@swift-ci nominate

@@ -2938,6 +2938,7 @@ ${assignmentOperatorComment(x.operator, True)}
#endif
// end of FIXME(integers)

@available(swift, deprecated: 4.2, obsoleted: 5)
Copy link
Member

Choose a reason for hiding this comment

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

Nit: It works up here, but this should be below the documentation comment and indented to match @inlinable.

@natecook1000
Copy link
Member

No need to update the comment — the tools show the necessary deprecation notices, so the docs can remain focused on the behavior.

@airspeedswift airspeedswift merged commit 31abddf into swiftlang:swift-4.2-branch Sep 21, 2018
@stephentyrone stephentyrone deleted the deprecate-unsafe-integer-funcs-4.2 branch February 8, 2023 00:36
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.

4 participants