JuliaCollections / JuliaCollections/DataStructures.jl

Resolve inconsistencies with functions startof, endof, firstindex, lastindex

Open
#910 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
745
Forks
261
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/tokens2.jl at the referenced token functions and compare the available startof/endof methods with firstindex/lastindex across the sorted-container types. Then inspect the sorted-containers documentation section; done means the APIs are consistent and the documentation reflects the current syntax.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
api, documentation
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.