DataStructures.jl icon indicating copy to clipboard operation
DataStructures.jl copied to clipboard

Resolve inconsistencies with functions startof, endof, firstindex, lastindex

Open claud10cv opened this issue 1 year ago • 2 comments

Functions startof, endof seem to have been deprecated, in favor of firstindex, lastindex, respectively, but they have been inconstently updated. In the reference below, startof remains the only possibility (firstindex(m::SortedMultiDict) for instance does not exist), while the opposite occurs with lastindex which seems to have replaced the method endof.

https://github.com/JuliaCollections/DataStructures.jl/blob/3776698802d7ee1581a60f006abd351ea69588cf/src/tokens2.jl#L9C1-L19C68

Moreover, the doc still reflects the old syntax (startof, endof) as current, see for instance https://juliacollections.github.io/DataStructures.jl/stable/sorted_containers/#Tokens-for-Sorted-Containers-1

claud10cv avatar Aug 13 '24 14:08 claud10cv

Yes, this is part of #479. We are struggling with not having enough julia developers who both have the experience to recognize these inconsistencies. and the time to contribute to the package.

Would you be interested in doing so? I can review.

oxinabox avatar Aug 13 '24 14:08 oxinabox

The documentation quoted in the OP message is not the most recent version. Please see the "dev" version of the docs and the package, which implements firstindex and lastindex.

StephenVavasis avatar Aug 13 '24 14:08 StephenVavasis