Skip to content

more methods for Iterators.Reverse? #62136

Description

@Hamiltonian-Action

I am not perfectly certain whether this would be considered a documentation issue, an implementation issue, or a bit of both. However, to my understanding, there is quite a bit of vagueness around what is automatically supported via the Iterators.reverse functionality. For instance, the length method seems to be inherited from the underlying iterator but :(==), copy, and eltype are not.

Whilst this is indeed a problem for those wishing to develop their own customised implementations, this also extends to the level of the standard library structures themselves as they too lack full coverage. Again, as an example, both Array and Dict fortunately have matching eltype with their reversed wrappers but the latter still lack methods for copying and checking equivalence.

Edit: I stand corrected, I merely misread the interface specification as eltype(::T) rather than eltype(::Type{T}).

Metadata

Metadata

Assignees

No one assigned

    Labels

    iterationInvolves iteration or the iteration protocolspeculativeWhether the change will be implemented is speculative

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions