-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
more methods for Iterators.Reverse? #62136
Copy link
Copy link
Open
Labels
iterationInvolves iteration or the iteration protocolInvolves iteration or the iteration protocolspeculativeWhether the change will be implemented is speculativeWhether the change will be implemented is speculative
Description
Metadata
Metadata
Assignees
Labels
iterationInvolves iteration or the iteration protocolInvolves iteration or the iteration protocolspeculativeWhether the change will be implemented is speculativeWhether the change will be implemented is speculative
Type
Fields
Give feedbackNo fields configured for issues without a type.
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.reversefunctionality. For instance, thelengthmethod seems to be inherited from the underlying iterator but:(==),copy, andare not.eltypeWhilst 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
ArrayandDictfortunately have matchingeltypewith 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 thaneltype(::Type{T}).