JuliaCollections / JuliaCollections/DataStructures.jl
`resize!(::CircularBuffer, n)` is surprising
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 745
- Forks
- 261
- PR merge metrics
- No merged PRs in 30d
Description
Following up on https://github.com/JuliaCollections/DataStructures.jl/pull/548#issuecomment-1227411169, resize! usually changes the length of collections, but not for CircularBuffer (am I missing an altenate convention in this package?). IMO it should be renamed, e.g. to sizehint!, or setcapacity! or capacity!. The introduction of resize! (#784) seems to not have yet been released, so this wouldn't be breaking.
This issue is similar to #447.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the CircularBuffer resize! entry point and the discussion in PR #548 and issue #447. Decide whether the API should be renamed to sizehint!, setcapacity!, or capacity!, then check the introduction in #784 and ensure the chosen name is applied consistently before release.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100