Skip to content

Parameter list pollution #2

@zenparsing

Description

@zenparsing

A cancellation token design where the cancel token is explicitly passed into the async operation via a parameter can lead to parameter list pollution. For C#, this is perhaps mitigated somewhat by the ability to overload function signatures based on static type information. In JS, we can't do the same kind of overloading.

It appears that an async function would need to "plan ahead" to support cancel tokens by reserving a parameter position for it (unless the cancel token is passed in an options bag). This seems unfortunate and goes against the "progressive enhancement" quality of cancel tokens in general.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions