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

Explicit unions #586

Open
annevk opened this issue Jun 16, 2023 · 1 comment
Open

Explicit unions #586

annevk opened this issue Jun 16, 2023 · 1 comment

Comments

@annevk
Copy link
Member

annevk commented Jun 16, 2023

@awesomekling mentioned he'd prefer somewhat more explicit union syntax in algorithms as opposed to "null or X", "string-or-null", etc.

It's a little awkward now and then currently, especially with null, so this seems worth considering.

Perhaps something like this:

To do algorithm, given a union { null, string } input, ...

@domenic
Copy link
Member

domenic commented Jun 16, 2023

I don't understand the advantages of this. We could try to be more consistent about how we declare nullability, but this kind of non-English syntax feels out of place.

@whatwg whatwg deleted a comment from Mamaomar Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants