Skip to content

Separate unfold resources from unfolder construction #946

Open

Description

@knoepfel

Summary

Redesign the unfold registration API so resource dependencies belong to the unfold operation, rather than being passed through input_family(...) alongside product selectors for constructing the unfolder.

Current behavior

input_family(...) product selectors configure the unfolder constructor, while trailing resource<T> arguments are applied to the unfold operation. This mixes two distinct concerns in one clause and makes the API semantics confusing. The unfolder constructor is not allowed to receive resources.

Desired behavior

Provide a distinct, explicit way to declare resources used by the unfold operation. Keep input_family(...) focused on matching products to the unfolder constructor, and ensure its constructor parameters do not include resources.

Acceptance criteria

  • The API expresses unfold-operation resource dependencies separately from unfolder-constructor inputs.
  • Product selectors in input_family(...) continue to correspond only to unfolder constructor parameters.
  • Unfolder constructors cannot receive resources.
  • Resources are provided to the unfold operation with the existing unlimited/serialized resource semantics and concurrency guarantees.
  • Tests cover constructor inputs and unfold-operation resource access independently.

Activity

  1. added this to the Prototype 0.5 milestone on Oct 2, 2026
  2. added theissue type on Oct 2, 2026
  3. beojan commented on Oct 19, 2026

    @beojan
    Contributor

    We could consider using std::generator style coroutines for unfolds, which would make them single callables like the other HOFs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorrefactor and/or cleanup

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions