Skip to content

numx_func1d_t: add a context parameter #77

Description

@erfanjazebnikoo

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:

  1. Add new _ctx variant functions alongside the existing ones (non-breaking, grows the API surface)
  2. A clean breaking change as part of v2.0.0 with a migration guide (this milestone)
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-designPublic API surface decisionscommunity-feedbackRaised by users or reviewers outside the core team

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions