[whatwg/webidl] Use "type list" when computing function lengths (PR #1667)

<!--
Thank you for contributing to the Web IDL Standard! Please describe the change you are making and complete the checklist below if your change is not editorial.

When you submit this PR, and each time you edit this comment (including checking a checkbox through the UI!), PR Preview will run and update it. As such make any edits in one go and only after PR Preview has run.

If you think your PR is ready to land, please double-check that the build is passing and the checklist is complete before pinging.
-->
Three algorithms compute a function's `length` as "the length of the shortest argument list" of the entries in an [effective overload set](https://webidl.spec.whatwg.org/#dfn-effective-overload-set):

- [create an interface object](https://webidl.spec.whatwg.org/#create-an-interface-object)
- [create a legacy factory function](https://webidl.spec.whatwg.org/#create-a-legacy-factory-function)
- [create an operation function](https://webidl.spec.whatwg.org/#dfn-create-operation-function)

An effective overload set entry is a tuple of a callable, a [type list](https://webidl.spec.whatwg.org/#type-list), and an optionality list, so it has no "argument list". And it seems that other part of spec already uses the term "argument list" for the callable's argument list. If it is read as the callable's arguments, "argument list" would also count optional arguments.

The [overload resolution algorithm](https://webidl.spec.whatwg.org/#dfn-overload-resolution-algorithm) already uses the the term "type list": "the longest type list of the entries in |S|".

This PR replaces "argument list" with "type list" in all three places.

Implementations and tests already work this way: idlharness.js checks every interface object, legacy factory function, and operation `length` to be the length of the shortest type list.
You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/webidl/pull/1667

-- Commit Summary --

  * Use "type list" when computing function lengths

-- File Changes --

    M index.bs (6)

-- Patch Links --

https://github.com/whatwg/webidl/pull/1667.patch
https://github.com/whatwg/webidl/pull/1667.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/pull/1667
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/pull/1667@github.com>

Received on Tuesday, 10 November 2026 11:42:49 UTC