numx_func1d_t: add a context parameter
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 23
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
Raised during the v1.0.0 launch on r/embedded (EpochVanquisher): numx_func1d_t is a plain numx_real_t ()(numx_real_t) with no void context parameter, so closures or extra parameters aren't possible without a global, which would violate the project's own no-global-mutable-state rule. Confirmed as a real limitation, not a false alarm, affects roots.c, integrate.c, differentiate.c, and ode.c.
Three options discussed, need a decision:
- Add new _ctx variant functions alongside the existing ones (non-breaking, grows the API surface)
- A clean breaking change as part of v2.0.0 with a migration guide (this milestone)
- Leave it as a documented, accepted limitation
Filed under v2.0.0 as the breaking-change option since that's the version where API breaks are expected; the decision itself (including possibly choosing option 1 or 3 instead) should happen before implementation.
Contributor guide
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 reading the numx_func1d_t declaration and its use sites in roots.c, integrate.c, differentiate.c, and ode.c. Compare the three API options against the no-global-mutable-state rule and the v2.0.0 scope. Done means a documented decision on the compatibility strategy and its implementation or deferral.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100