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

Remove deprecated items .all_close() and DataClone, ArrayView::into_slice #874

Merged
merged 6 commits into from
Dec 29, 2020

Conversation

bluss
Copy link
Member

@bluss bluss commented Dec 24, 2020

  • Remove deprecated .all_close() - use approx feature and methods like .abs_diff_eq instead
  • Mark .scalar_sum() as deprecated - use .sum() instead
  • Remove deprecated DataClone - use Data + RawDataClone instead
  • Remove deprecated ArrayView::into_slice - use to_slice() instead.

Fixes #863

ArrayView::into_slice vs to_slice

Looking closely at this one, I'd want to use the name into_slice.
The "into" semantic is for preserving the lifetime from the input
to the output - and for setting it more apart from the general ArrayBase::as_slice.

However, both names into-slice and to-slice have pros and cons
and in the interest of reducing churn, the already deprecated method
loses in the tiebreaker IMO, and so into_slice is removed because
clippy said so.

Previously in #646

Use Data + RawDataClone as replacement
@bluss bluss changed the title Remove deprecated items, un-deprecate ArrayView::into_slice Remove deprecated items .all_close() and DataClone, un-deprecate ArrayView::into_slice Dec 24, 2020
@bluss bluss force-pushed the process-deprecations branch from 721263f to ca691c5 Compare December 24, 2020 00:47
@bluss
Copy link
Member Author

bluss commented Dec 25, 2020

The ArrayView::to_slice/into_slice situation: it's not clear cut, it could swing both ways, but to me the into_slice name feels truest to what the method does.

@bluss bluss added this to the 0.15.0 milestone Dec 25, 2020
This could really use either name - `into_slice` for the "into" semantic
of preserving the lifetime parameter, or the `to_slice` name which is
customary for `&self` methods.

Both names have the problem that they compete with
`ArrayBase::as_slice()`, but the doc has been improved to explain some
of that.
@bluss bluss changed the title Remove deprecated items .all_close() and DataClone, un-deprecate ArrayView::into_slice Remove deprecated items .all_close() and DataClone, ArrayView::into_slice Dec 29, 2020
@bluss bluss force-pushed the process-deprecations branch from 1ec4142 to e071bdb Compare December 29, 2020 01:25
@bluss
Copy link
Member Author

bluss commented Dec 29, 2020

I changed my mind about keeping into_slice. It's really a toss-up which is best between into_slice and to_slice. I'd prefer into_slice, but it's too churny to reverse the deprecation, so I also prefer to not do that.

@bluss bluss merged commit 79392bb into master Dec 29, 2020
@bluss bluss deleted the process-deprecations branch December 29, 2020 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove deprecated items
1 participant