Skip to content
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

How an empty condition in the "not" condition should be handled? #22

Closed
yoshisatoyanagisawa opened this issue Mar 15, 2024 · 7 comments
Closed

Comments

@yoshisatoyanagisawa
Copy link
Collaborator

yoshisatoyanagisawa commented Mar 15, 2024

If "not" condition gets an empty condition, i.e. {}, how should it be handled?
I suppose options are:

  1. raise.
  2. treat it as always true.

We used to treat an empty list to "or" condition as always false. However, I suppose it fine to raise.
What do others think?

@yoshisatoyanagisawa
Copy link
Collaborator Author

@domenic @azaika I guess you have opinions in this area.

@azaika
Copy link

azaika commented Mar 15, 2024

IMO, raising is the good option.
The "or" condition allows empty lists because they are naturally considered logical identity, and this does not fits to the "not".

@domenic
Copy link
Contributor

domenic commented Mar 15, 2024

I agree with @azaika

@yoshisatoyanagisawa
Copy link
Collaborator Author

Thank you for sharing your opinions, both. Raising sounds the way to go.
However, to gather opinions from others, let me leave the github issue open for several weeks before making the final decision.

@yoshisatoyanagisawa
Copy link
Collaborator Author

Drafted the PR in w3c/ServiceWorker#1711

@yoshisatoyanagisawa
Copy link
Collaborator Author

Two weeks have passed. It might be fine to close this.
No contents in the "not" condition is error.

@yoshisatoyanagisawa
Copy link
Collaborator Author

Please feel free to leave comments in the spec PR by the way.

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

3 participants