Skip to content

Shall we validate builtin set names? #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vouillon opened this issue Aug 21, 2024 · 2 comments
Closed

Shall we validate builtin set names? #40

vouillon opened this issue Aug 21, 2024 · 2 comments

Comments

@vouillon
Copy link
Contributor

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.

@eqrion
Copy link
Collaborator

eqrion commented Aug 21, 2024

Ah, I had only thought about the case of an engine implementing this proposal vs not implementing this proposal. I didn't think through progressive enhancement for the case of future builtin proposals.

I agree that not validating the builtin set names would make progressive enhancement simpler. I can't think of any downsides right now, so it seems like a good improvement to make.

@eqrion
Copy link
Collaborator

eqrion commented Aug 23, 2024

This should be fixed by 7851a78.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants