JuliaGeometry / JuliaGeometry/GeometryBasics.jl
ensure consistency among `Base.iterate` and `Base.in`
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 215
- Forks
- 64
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 2
Description
The definitions at
are convenient, but they induce a non-geometric definition of Base.in, due to the fallback definition https://github.com/JuliaLang/julia/blob/4b739e711a7241f48ec0525e97c44cc870a9af99/base/operators.jl#L1109-L1120 and furthermore a geometric definition like the following
are inconsistent with the documentation for Base.in. Since it is a shame to be inconsistent (because generic programs may break since they may rely on a consistency of iterate and in, and since it is a shame to lose the notation of point ∈ polygon, I propose ensuring that either
- a type represents an infinite set of points and does not implement
iterate - a type represents a finite set of points and implements
iterate
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 with the definitions in src/basic_types.jl at the referenced lines, then compare Julia's Base.in fallback and the prior GeometryTypes.jl polygon definition. Determine how the affected geometry types should satisfy the proposed finite-set or infinite-set distinction, and confirm that iterate, in, and their documentation are consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- computer-graphics
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100