Skip to content

Removing old iterator methods #215

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
kimikage opened this issue Aug 16, 2020 · 0 comments · Fixed by #231
Closed

Removing old iterator methods #215

kimikage opened this issue Aug 16, 2020 · 0 comments · Fixed by #231

Comments

@kimikage
Copy link
Collaborator

The start, next and done functions were used in iterators prior to Julia v0.7.

# The main subtlety here is that iterating over N0f8(0):N0f8(1) will wrap around
# unless we iterate using a wider type
@inline start(r::StepRange{T}) where {T <: Normed} = widen1(reinterpret(r.start))
@inline next(r::StepRange{T}, i::Integer) where {T <: Normed} = (T(i,0), i+reinterpret(r.step))
@inline function done(r::StepRange{T}, i::Integer) where {T <: Normed}
i1, i2 = reinterpret(r.start), reinterpret(r.stop)
isempty(r) | (i < min(i1, i2)) | (i > max(i1, i2))
end

These methods were already decoupled from Base two years ago (cf. PR #112). Also, Range has been fixed in PR #163.
I should have noticed when I was reviewing PR #163 that they are probably fine to be removed. Since they are no longer exported, I don't think a deprecation notice is necessary.

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 a pull request may close this issue.

1 participant