Skip to content

Shall we validate builtin set names? #40

Closed
@vouillon

Description

@vouillon

I'm wondering whether the builtin set names should be validated, as specified here:

To <dfn>validate builtin set names</dfn> with |builtinSetNames|, perform the following steps:
1. If |builtinSetNames| contains any duplicates, return false.
1. [=list/iterate|For each=] |builtinSetName| of |builtinSetNames|,
1. If |builtinSetName| does not equal the name of one of the builtin sets defined in this section, return false.
1. Return false.

An advantage is that for feature detection one doesn't even need to import a builtin operation with an incorrect signature.

But it makes progressive enhancement more complicated. The current progressive enhancement section states that it's safe for users to request builtins while still providing a polyfill for backup behavior and the optimal path will be chosen. But if we validate the builtin set names and some builtins are not supported, the validation is going to fail even when a polyfill is provided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions